blob: 5fc58081d511162db586b868caa4697547ef2bb2 [file] [log] [blame]
Uriel Guajardo359a3762021-03-11 07:23:13 -08001/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * KUnit API allowing dynamic analysis tools to interact with KUnit tests
4 *
5 * Copyright (C) 2020, Google LLC.
6 * Author: Uriel Guajardo <urielguajardo@google.com>
7 */
8
9#ifndef _KUNIT_TEST_BUG_H
10#define _KUNIT_TEST_BUG_H
11
12#define kunit_fail_current_test(fmt, ...) \
13 __kunit_fail_current_test(__FILE__, __LINE__, fmt, ##__VA_ARGS__)
14
15#if IS_BUILTIN(CONFIG_KUNIT)
16
17extern __printf(3, 4) void __kunit_fail_current_test(const char *file, int line,
18 const char *fmt, ...);
19
20#else
21
Daniel Latypovf65968a2021-04-06 10:29:01 -070022static inline __printf(3, 4) void __kunit_fail_current_test(const char *file, int line,
23 const char *fmt, ...)
Uriel Guajardo359a3762021-03-11 07:23:13 -080024{
25}
26
27#endif
28
29#endif /* _KUNIT_TEST_BUG_H */