selftests: timers: drop support for !KTEST case
authorShuah Khan <shuahkh@osg.samsung.com>
Fri, 11 Aug 2017 16:11:42 +0000 (10:11 -0600)
committerShuah Khan <shuahkh@osg.samsung.com>
Tue, 22 Aug 2017 17:15:59 +0000 (11:15 -0600)
There is no need to keep timers tests in sync with external timers
repo. Drop support for !KTEST to support for building and running
timers tests without kselftest framework.

Reference: https://lkml.org/lkml/2017/8/10/952
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Acked-by: John Stultz <john.stultz@linaro.org>
19 files changed:
tools/testing/selftests/timers/Makefile
tools/testing/selftests/timers/adjtick.c
tools/testing/selftests/timers/alarmtimer-suspend.c
tools/testing/selftests/timers/change_skew.c
tools/testing/selftests/timers/clocksource-switch.c
tools/testing/selftests/timers/inconsistency-check.c
tools/testing/selftests/timers/leap-a-day.c
tools/testing/selftests/timers/leapcrash.c
tools/testing/selftests/timers/mqueue-lat.c
tools/testing/selftests/timers/nanosleep.c
tools/testing/selftests/timers/nsleep-lat.c
tools/testing/selftests/timers/raw_skew.c
tools/testing/selftests/timers/set-2038.c
tools/testing/selftests/timers/set-tai.c
tools/testing/selftests/timers/set-timer-lat.c
tools/testing/selftests/timers/set-tz.c
tools/testing/selftests/timers/skew_consistency.c
tools/testing/selftests/timers/threadtest.c
tools/testing/selftests/timers/valid-adjtimex.c

index a9b86133b9b3986ff3617e4e9e0a6c45f1ee16bb..c805ab048d26cbb09ab957836ab73a08e4849c6f 100644 (file)
@@ -1,5 +1,4 @@
-BUILD_FLAGS = -DKTEST
-CFLAGS += -O3 -Wl,-no-as-needed -Wall $(BUILD_FLAGS)
+CFLAGS += -O3 -Wl,-no-as-needed -Wall
 LDFLAGS += -lrt -lpthread -lm
 
 # these are all "safe" tests that don't modify
index 9887fd538fec0d601342ac5b5f173292d77a8722..0caca3a06bd26eebdff08ce7700aff14f58eb558 100644 (file)
 #include <sys/timex.h>
 #include <time.h>
 
-#ifdef KTEST
 #include "../kselftest.h"
-#else
-static inline int ksft_exit_pass(void)
-{
-       exit(0);
-}
-static inline int ksft_exit_fail(void)
-{
-       exit(1);
-}
-#endif
 
 #define CLOCK_MONOTONIC_RAW    4
 
index 2b361b8303955b6fa91e9844586ae84843203056..4da09dbf83ba8e18aebfe8ddf3a09289bdf2d8a8 100644 (file)
 #include <signal.h>
 #include <stdlib.h>
 #include <pthread.h>
-#ifdef KTEST
 #include "../kselftest.h"
-#else
-static inline int ksft_exit_pass(void)
-{
-       exit(0);
-}
-static inline int ksft_exit_fail(void)
-{
-       exit(1);
-}
-#endif
 
 #define CLOCK_REALTIME                 0
 #define CLOCK_MONOTONIC                        1
index cb1968977c04db7ecb7b58da665c17e44df76b0d..c4eab7124990ce1b8fe2a541ff2077b7b37ebe90 100644 (file)
 #include <sys/time.h>
 #include <sys/timex.h>
 #include <time.h>
-#ifdef KTEST
 #include "../kselftest.h"
-#else
-static inline int ksft_exit_pass(void)
-{
-       exit(0);
-}
-static inline int ksft_exit_fail(void)
-{
-       exit(1);
-}
-#endif
 
 #define NSEC_PER_SEC 1000000000LL
 
index 5ff165373f8ba1b51502ca28a7d0324dc671a4e9..3ef214628067881ac46a4c755eb493bd315c5d28 100644 (file)
 #include <fcntl.h>
 #include <string.h>
 #include <sys/wait.h>
-#ifdef KTEST
 #include "../kselftest.h"
-#else
-static inline int ksft_exit_pass(void)
-{
-       exit(0);
-}
-static inline int ksft_exit_fail(void)
-{
-       exit(1);
-}
-#endif
 
 
 int get_clocksources(char list[][30])
index 74c60e8759a017dee58604860e111c8cfb5a2e76..022d3ffe3fbffbdfe87b217063e77ccf1716948b 100644 (file)
 #include <sys/timex.h>
 #include <string.h>
 #include <signal.h>
-#ifdef KTEST
 #include "../kselftest.h"
-#else
-static inline int ksft_exit_pass(void)
-{
-       exit(0);
-}
-static inline int ksft_exit_fail(void)
-{
-       exit(1);
-}
-#endif
 
 #define CALLS_PER_LOOP 64
 #define NSEC_PER_SEC 1000000000ULL
index fb46ad6ac92cadc71254c68c80953eeae51b218b..a13d2cd324c3643c6412c6b1f23595480b3e6740 100644 (file)
 #include <string.h>
 #include <signal.h>
 #include <unistd.h>
-#ifdef KTEST
 #include "../kselftest.h"
-#else
-static inline int ksft_exit_pass(void)
-{
-       exit(0);
-}
-static inline int ksft_exit_fail(void)
-{
-       exit(1);
-}
-#endif
 
 #define NSEC_PER_SEC 1000000000ULL
 #define CLOCK_TAI 11
index a1071bdbdeb7608afea5d2c653cc59d591004a08..830c462f605d9476b712f909db2a62c09e053959 100644 (file)
 #include <sys/timex.h>
 #include <string.h>
 #include <signal.h>
-#ifdef KTEST
 #include "../kselftest.h"
-#else
-static inline int ksft_exit_pass(void)
-{
-       exit(0);
-}
-static inline int ksft_exit_fail(void)
-{
-       exit(1);
-}
-#endif
-
-
 
 /* clear NTP time_status & time_state */
 int clear_time_state(void)
index a2a3924d0b41f2936822e20d3b3613a41b617f1b..1867db5d6f5e0fcf9a9f494e54a570dc07aae0d6 100644 (file)
 #include <signal.h>
 #include <errno.h>
 #include <mqueue.h>
-#ifdef KTEST
 #include "../kselftest.h"
-#else
-static inline int ksft_exit_pass(void)
-{
-       exit(0);
-}
-static inline int ksft_exit_fail(void)
-{
-       exit(1);
-}
-#endif
 
 #define NSEC_PER_SEC 1000000000ULL
 
index ff942ff7c9b367e8e306d6730c01fe92b1abd882..8adb0bb51d4da4a1ab4eddde5d15be21a5ffcfb1 100644 (file)
 #include <sys/timex.h>
 #include <string.h>
 #include <signal.h>
-#ifdef KTEST
 #include "../kselftest.h"
-#else
-static inline int ksft_exit_pass(void)
-{
-       exit(0);
-}
-static inline int ksft_exit_fail(void)
-{
-       exit(1);
-}
-#endif
 
 #define NSEC_PER_SEC 1000000000ULL
 
index 2d7898fda0f1d3c8d012d66b2d8ba73fbbe728d5..c3c3dc10db17fe1493994fa2209bd06ce35b94fb 100644 (file)
 #include <sys/timex.h>
 #include <string.h>
 #include <signal.h>
-#ifdef KTEST
 #include "../kselftest.h"
-#else
-static inline int ksft_exit_pass(void)
-{
-       exit(0);
-}
-static inline int ksft_exit_fail(void)
-{
-       exit(1);
-}
-#endif
 
 #define NSEC_PER_SEC 1000000000ULL
 
index 30906bfd9c1b582636a3ff85a5abd1d1bfb187a9..ca6cd146aafe15420cb345ef3ba934dd21e13220 100644 (file)
 #include <sys/time.h>
 #include <sys/timex.h>
 #include <time.h>
-#ifdef KTEST
 #include "../kselftest.h"
-#else
-static inline int ksft_exit_pass(void)
-{
-       exit(0);
-}
-static inline int ksft_exit_fail(void)
-{
-       exit(1);
-}
-#endif
-
 
 #define CLOCK_MONOTONIC_RAW            4
 #define NSEC_PER_SEC 1000000000LL
index c8a7e14446b19e0550138abd4f8c0405f27ad897..688cfd81b5319f482328a015810a93d1a6707c45 100644 (file)
 #include <unistd.h>
 #include <time.h>
 #include <sys/time.h>
-#ifdef KTEST
 #include "../kselftest.h"
-#else
-static inline int ksft_exit_pass(void)
-{
-       exit(0);
-}
-static inline int ksft_exit_fail(void)
-{
-       exit(1);
-}
-#endif
 
 #define NSEC_PER_SEC 1000000000LL
 
index dc88dbc8831f18cd2c6e08cade6f33348199b2d3..70fed27d8fd3cf8db9401542759ed53946e3e512 100644 (file)
 #include <string.h>
 #include <signal.h>
 #include <unistd.h>
-#ifdef KTEST
 #include "../kselftest.h"
-#else
-static inline int ksft_exit_pass(void)
-{
-       exit(0);
-}
-static inline int ksft_exit_fail(void)
-{
-       exit(1);
-}
-#endif
 
 int set_tai(int offset)
 {
index 4fc98c5b089972fadc77fea1c6d212b2685d4569..b343ac90b59894dc07cb7f997ac6d7e307725709 100644 (file)
 #include <signal.h>
 #include <stdlib.h>
 #include <pthread.h>
-#ifdef KTEST
 #include "../kselftest.h"
-#else
-static inline int ksft_exit_pass(void)
-{
-       exit(0);
-}
-static inline int ksft_exit_fail(void)
-{
-       exit(1);
-}
-#endif
 
 #define CLOCK_REALTIME                 0
 #define CLOCK_MONOTONIC                        1
index f4184928b16bc38ca845be32908f48d302702856..877fd5532fee03ee9fe25bed1505fcedf78dde60 100644 (file)
 #include <string.h>
 #include <signal.h>
 #include <unistd.h>
-#ifdef KTEST
 #include "../kselftest.h"
-#else
-static inline int ksft_exit_pass(void)
-{
-       exit(0);
-}
-static inline int ksft_exit_fail(void)
-{
-       exit(1);
-}
-#endif
 
 int set_tz(int min, int dst)
 {
index 2a996e0722594a6001e339bc00458fb13878709d..022b711c78ee51303dd33399753f61e8b26929d0 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 #include <sys/wait.h>
-#ifdef KTEST
 #include "../kselftest.h"
-#else
-static inline int ksft_exit_pass(void)
-{
-       exit(0);
-}
-static inline int ksft_exit_fail(void)
-{
-       exit(1);
-}
-#endif
 
 #define NSEC_PER_SEC 1000000000LL
 
index e632e116f05e7e679f38a091072c3acf1d0954fe..759c9c06f1a034d4a566d81c1fb556f0c46bceff 100644 (file)
 #include <stdlib.h>
 #include <sys/time.h>
 #include <pthread.h>
-#ifdef KTEST
 #include "../kselftest.h"
-#else
-static inline int ksft_exit_pass(void)
-{
-       exit(0);
-}
-static inline int ksft_exit_fail(void)
-{
-       exit(1);
-}
-#endif
-
 
 /* serializes shared list access */
 pthread_mutex_t list_lock = PTHREAD_MUTEX_INITIALIZER;
index 60fe3c569bd90f9cbfdc9664720c598e9430e8a3..d9d3ab93b31a75a766bb8c1cbf8e30ce2c24bed3 100644 (file)
 #include <string.h>
 #include <signal.h>
 #include <unistd.h>
-#ifdef KTEST
 #include "../kselftest.h"
-#else
-static inline int ksft_exit_pass(void)
-{
-       exit(0);
-}
-static inline int ksft_exit_fail(void)
-{
-       exit(1);
-}
-#endif
 
 #define NSEC_PER_SEC 1000000000LL
 #define USEC_PER_SEC 1000000LL