Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * KUnit API allowing dynamic analysis tools to interact with KUnit tests
0004  *
0005  * Copyright (C) 2020, Google LLC.
0006  * Author: Uriel Guajardo <urielguajardo@google.com>
0007  */
0008 
0009 #ifndef _KUNIT_TEST_BUG_H
0010 #define _KUNIT_TEST_BUG_H
0011 
0012 #define kunit_fail_current_test(fmt, ...) \
0013     __kunit_fail_current_test(__FILE__, __LINE__, fmt, ##__VA_ARGS__)
0014 
0015 #if IS_BUILTIN(CONFIG_KUNIT)
0016 
0017 extern __printf(3, 4) void __kunit_fail_current_test(const char *file, int line,
0018                             const char *fmt, ...);
0019 
0020 #else
0021 
0022 static inline __printf(3, 4) void __kunit_fail_current_test(const char *file, int line,
0023                                 const char *fmt, ...)
0024 {
0025 }
0026 
0027 #endif
0028 
0029 #endif /* _KUNIT_TEST_BUG_H */