2 * kselftest.h: kselftest framework return codes to include from
5 * Copyright (c) 2014 Shuah Khan <shuahkh@osg.samsung.com>
6 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
8 * This file is released under the GPLv2.
16 /* define kselftest exit codes */
25 unsigned int ksft_pass
;
26 unsigned int ksft_fail
;
27 unsigned int ksft_xfail
;
28 unsigned int ksft_xpass
;
29 unsigned int ksft_xskip
;
32 static struct ksft_count ksft_cnt
;
34 static inline void ksft_inc_pass_cnt(void) { ksft_cnt
.ksft_pass
++; }
35 static inline void ksft_inc_fail_cnt(void) { ksft_cnt
.ksft_fail
++; }
36 static inline void ksft_inc_xfail_cnt(void) { ksft_cnt
.ksft_xfail
++; }
37 static inline void ksft_inc_xpass_cnt(void) { ksft_cnt
.ksft_xpass
++; }
38 static inline void ksft_inc_xskip_cnt(void) { ksft_cnt
.ksft_xskip
++; }
40 static inline void ksft_print_cnts(void)
42 printf("Pass: %d Fail: %d Xfail: %d Xpass: %d, Xskip: %d\n",
43 ksft_cnt
.ksft_pass
, ksft_cnt
.ksft_fail
,
44 ksft_cnt
.ksft_xfail
, ksft_cnt
.ksft_xpass
,
48 static inline int ksft_exit_pass(void)
52 static inline int ksft_exit_fail(void)
56 static inline int ksft_exit_xfail(void)
60 static inline int ksft_exit_xpass(void)
64 static inline int ksft_exit_skip(void)
69 #endif /* __KSELFTEST_H */