Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1709126

[PATCH 3/3] selftests: timers: freq-step: to work without ksft framework

From Shuah Khan <shuahkh@osg.samsung.com>
Newsgroups linux.kernel
Subject [PATCH 3/3] selftests: timers: freq-step: to work without ksft framework
Date 2017-08-11 02:00 +0200
Message-ID <ud5wS-4qF-19@gated-at.bofh.it> (permalink)
References <ud5wS-4qF-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Signed-off-by: Shuah Khan <shuahkh@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

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH 3/3] selftests: timers: freq-step: to work without ksft framework Shuah Khan <shuahkh@osg.samsung.com> - 2017-08-11 02:00 +0200

csiph-web