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.
18 unsigned int ksft_pass
;
19 unsigned int ksft_fail
;
20 unsigned int ksft_xfail
;
21 unsigned int ksft_xpass
;
22 unsigned int ksft_xskip
;
25 static struct ksft_count ksft_cnt
;
27 static inline void ksft_inc_pass_cnt(void) { ksft_cnt
.ksft_pass
++; }
28 static inline void ksft_inc_fail_cnt(void) { ksft_cnt
.ksft_fail
++; }
29 static inline void ksft_inc_xfail_cnt(void) { ksft_cnt
.ksft_xfail
++; }
30 static inline void ksft_inc_xpass_cnt(void) { ksft_cnt
.ksft_xpass
++; }
31 static inline void ksft_inc_xskip_cnt(void) { ksft_cnt
.ksft_xskip
++; }
33 static inline void ksft_print_cnts(void)
35 printf("Pass: %d Fail: %d Xfail: %d Xpass: %d, Xskip: %d\n",
36 ksft_cnt
.ksft_pass
, ksft_cnt
.ksft_fail
,
37 ksft_cnt
.ksft_xfail
, ksft_cnt
.ksft_xpass
,
41 static inline int ksft_exit_pass(void)
45 static inline int ksft_exit_fail(void)
49 static inline int ksft_exit_xfail(void)
53 static inline int ksft_exit_xpass(void)
57 static inline int ksft_exit_skip(void)
62 #endif /* __KSELFTEST_H */