]> git.proxmox.com Git - mirror_ubuntu-kernels.git/blame - include/kunit/test-bug.h
Merge tag 'apparmor-pr-2021-11-10' of git://git.kernel.org/pub/scm/linux/kernel/git...
[mirror_ubuntu-kernels.git] / include / kunit / test-bug.h
CommitLineData
359a3760
UG
1/* 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
f65968ac
DL
22static inline __printf(3, 4) void __kunit_fail_current_test(const char *file, int line,
23 const char *fmt, ...)
359a3760
UG
24{
25}
26
27#endif
28
29#endif /* _KUNIT_TEST_BUG_H */