0001
0002
0003 #ifndef __SELFTEST_TIMENS_LOG_H__
0004 #define __SELFTEST_TIMENS_LOG_H__
0005
0006 #define pr_msg(fmt, lvl, ...) \
0007 ksft_print_msg("[%s] (%s:%d)\t" fmt "\n", \
0008 lvl, __FILE__, __LINE__, ##__VA_ARGS__)
0009
0010 #define pr_p(func, fmt, ...) func(fmt ": %m", ##__VA_ARGS__)
0011
0012 #define pr_err(fmt, ...) \
0013 ({ \
0014 ksft_test_result_error(fmt "\n", ##__VA_ARGS__); \
0015 -1; \
0016 })
0017
0018 #define pr_fail(fmt, ...) \
0019 ({ \
0020 ksft_test_result_fail(fmt, ##__VA_ARGS__); \
0021 -1; \
0022 })
0023
0024 #define pr_perror(fmt, ...) pr_p(pr_err, fmt, ##__VA_ARGS__)
0025
0026 #endif