test-bug.h 694 B

1234567891011121314151617181920212223242526272829
  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 <[email protected]>
  7. */
  8. #ifndef _KUNIT_TEST_BUG_H
  9. #define _KUNIT_TEST_BUG_H
  10. #define kunit_fail_current_test(fmt, ...) \
  11. __kunit_fail_current_test(__FILE__, __LINE__, fmt, ##__VA_ARGS__)
  12. #if IS_BUILTIN(CONFIG_KUNIT)
  13. extern __printf(3, 4) void __kunit_fail_current_test(const char *file, int line,
  14. const char *fmt, ...);
  15. #else
  16. static inline __printf(3, 4) void __kunit_fail_current_test(const char *file, int line,
  17. const char *fmt, ...)
  18. {
  19. }
  20. #endif
  21. #endif /* _KUNIT_TEST_BUG_H */