diff options
author | Paul Elder <paul.elder@pitt.edu> | 2017-06-28 10:40:21 -0400 |
---|---|---|
committer | Shuah Khan <shuahkh@osg.samsung.com> | 2017-06-30 18:15:04 -0400 |
commit | ab52a484455007b3c9c11e18f6d0eed6d8f2de4e (patch) | |
tree | 87d3718dcec095e23d7d1d8a68fac8dffea58c2d /tools | |
parent | 151b2732111f0743e764a7bc62d4f580341a62f3 (diff) |
kselftest: add ksft_print_msg() function to output general information
Add a generic information output function: ksft_print_msg()
Signed-off-by: Paul Elder <paul.elder@pitt.edu>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/kselftest.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/testing/selftests/kselftest.h b/tools/testing/selftests/kselftest.h index a00844e4c915..08e90c2cc5cb 100644 --- a/tools/testing/selftests/kselftest.h +++ b/tools/testing/selftests/kselftest.h | |||
@@ -55,6 +55,16 @@ static inline void ksft_print_cnts(void) | |||
55 | printf("1..%d\n", ksft_test_num()); | 55 | printf("1..%d\n", ksft_test_num()); |
56 | } | 56 | } |
57 | 57 | ||
58 | static inline void ksft_print_msg(const char *msg, ...) | ||
59 | { | ||
60 | va_list args; | ||
61 | |||
62 | va_start(args, msg); | ||
63 | printf("# "); | ||
64 | vprintf(msg, args); | ||
65 | va_end(args); | ||
66 | } | ||
67 | |||
58 | static inline void ksft_test_result_pass(const char *msg, ...) | 68 | static inline void ksft_test_result_pass(const char *msg, ...) |
59 | { | 69 | { |
60 | va_list args; | 70 | va_list args; |