1 /* SPDX-License-Identifier: GPL-2.0 */ 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 2 3 #ifndef __SELFTEST_TIMENS_LOG_H__ 3 #ifndef __SELFTEST_TIMENS_LOG_H__ 4 #define __SELFTEST_TIMENS_LOG_H__ 4 #define __SELFTEST_TIMENS_LOG_H__ 5 5 6 #define pr_msg(fmt, lvl, ...) 6 #define pr_msg(fmt, lvl, ...) \ 7 ksft_print_msg("[%s] (%s:%d)\t" fmt "\ 7 ksft_print_msg("[%s] (%s:%d)\t" fmt "\n", \ 8 lvl, __FILE__, __LINE_ 8 lvl, __FILE__, __LINE__, ##__VA_ARGS__) 9 9 10 #define pr_p(func, fmt, ...) func(fmt ": %m 10 #define pr_p(func, fmt, ...) func(fmt ": %m", ##__VA_ARGS__) 11 11 12 #define pr_err(fmt, ...) 12 #define pr_err(fmt, ...) \ 13 ({ 13 ({ \ 14 ksft_test_result_error(fmt "\n 14 ksft_test_result_error(fmt "\n", ##__VA_ARGS__); \ 15 -1; 15 -1; \ 16 }) 16 }) 17 17 18 #define pr_fail(fmt, ...) 18 #define pr_fail(fmt, ...) \ 19 ({ 19 ({ \ 20 ksft_test_result_fail(fmt, ##_ 20 ksft_test_result_fail(fmt, ##__VA_ARGS__); \ 21 -1; 21 -1; \ 22 }) 22 }) 23 23 24 #define pr_perror(fmt, ...) pr_p(pr_err, f 24 #define pr_perror(fmt, ...) pr_p(pr_err, fmt, ##__VA_ARGS__) 25 25 26 #endif 26 #endif 27 27
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.