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 a9b8613..c805ab0 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 9887fd5..0caca3a 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 2b361b8..4da09db 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 cb19689..c4eab71 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 5ff1653..3ef2146 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 74c60e8..022d3ff 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 fb46ad6..a13d2cd 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 a1071bd..830c462 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 a2a3924..1867db5 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 ff942ff..8adb0bb 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 2d7898f..c3c3dc1 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 30906bf..ca6cd14 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 c8a7e14..688cfd8 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 dc88dbc..70fed27 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 4fc98c5..b343ac9 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 f418492..877fd55 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 2a996e0..022b711 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 e632e11..759c9c0 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 60fe3c5..d9d3ab9 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