Fix to build and run without ksft framework like the other timers tests.

Signed-off-by: Shuah Khan <shua...@osg.samsung.com>
---
 tools/testing/selftests/timers/freq-step.c       | 4 ++++
 tools/testing/selftests/timers/kselftest_stubs.h | 1 +
 2 files changed, 5 insertions(+)

diff --git a/tools/testing/selftests/timers/freq-step.c 
b/tools/testing/selftests/timers/freq-step.c
index 22312eb4c941..a0438eb655c4 100644
--- a/tools/testing/selftests/timers/freq-step.c
+++ b/tools/testing/selftests/timers/freq-step.c
@@ -23,7 +23,11 @@
 #include <time.h>
 #include <unistd.h>
 
+#ifdef KTEST
 #include "../kselftest.h"
+#else
+#include "kselftest_stubs.h"
+#endif
 
 #define SAMPLES 100
 #define SAMPLE_READINGS 10
diff --git a/tools/testing/selftests/timers/kselftest_stubs.h 
b/tools/testing/selftests/timers/kselftest_stubs.h
index 9d2490f3932f..62e3cd36b17d 100644
--- a/tools/testing/selftests/timers/kselftest_stubs.h
+++ b/tools/testing/selftests/timers/kselftest_stubs.h
@@ -18,5 +18,6 @@
 
 static inline int ksft_exit_pass(void) { exit(0); }
 static inline int ksft_exit_fail(void) { exit(1); }
+static inline int ksft_exit_skip(const char *msg, ...) { exit(4); }
 
 #endif /* __KSELFTEST__STUBS_H */
-- 
2.11.0

Reply via email to