linux/include/kunit
David Gow 806cb22702 kunit: Annotate _MSG assertion variants with gnu printf specifiers
KUnit's assertion macros have variants which accept a printf format
string, to allow tests to specify a more detailed message on failure.
These (and the related KUNIT_FAIL() macro) ultimately wrap the
__kunit_do_failed_assertion() function, which accepted a printf format
specifier, but did not have the __printf attribute, so gcc couldn't warn
on incorrect agruments.

It turns out there were quite a few tests with such incorrect arguments.

Add the __printf() specifier now that we've fixed these errors, to
prevent them from recurring.

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: David Gow <davidgow@google.com>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Justin Stitt <justinstitt@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2024-02-28 13:07:49 -07:00
..
assert.h kunit: remove KUNIT_INIT_MEM_ASSERTION macro 2022-12-12 14:13:47 -07:00
attributes.h kunit: Add ability to filter attributes 2023-07-26 13:29:15 -06:00
device.h kunit: Add APIs for managing devices 2023-12-18 13:28:08 -07:00
resource.h kunit: Add a macro to wrap a deferred action function 2023-12-18 13:21:14 -07:00
skbuff.h kunit: add a convenience allocation wrapper for SKBs 2024-01-03 15:35:07 +01:00
static_stub.h kunit: Allow passing function pointer to kunit_activate_static_stub() 2024-01-03 09:06:52 -07:00
test-bug.h kunit: test-bug.h: include stddef.h for NULL 2023-07-18 15:38:13 -06:00
test.h kunit: Annotate _MSG assertion variants with gnu printf specifiers 2024-02-28 13:07:49 -07:00
try-catch.h kunit: hide unexported try-catch interface in try-catch-impl.h 2020-01-09 16:42:09 -07:00
visibility.h kunit: add macro to allow conditionally exposing static symbols to tests 2022-12-12 14:13:48 -07:00