1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/tools/testing/selftests/net/tcp_ao
Dmitry Safonov b476c93654 selftests/tcp_ao: Printing fixes to confirm with format-security
On my new laptop with packages from nixos-unstable, gcc 12.3.0 produces
> lib/setup.c: In function ‘__test_msg’:
> lib/setup.c:20:9: error: format not a string literal and no format arguments [-Werror=format-security]
>    20 |         ksft_print_msg(buf);
>       |         ^~~~~~~~~~~~~~
> lib/setup.c: In function ‘__test_ok’:
> lib/setup.c:26:9: error: format not a string literal and no format arguments [-Werror=format-security]
>    26 |         ksft_test_result_pass(buf);
>       |         ^~~~~~~~~~~~~~~~~~~~~
> lib/setup.c: In function ‘__test_fail’:
> lib/setup.c:32:9: error: format not a string literal and no format arguments [-Werror=format-security]
>    32 |         ksft_test_result_fail(buf);
>       |         ^~~~~~~~~~~~~~~~~~~~~
> lib/setup.c: In function ‘__test_xfail’:
> lib/setup.c:38:9: error: format not a string literal and no format arguments [-Werror=format-security]
>    38 |         ksft_test_result_xfail(buf);
>       |         ^~~~~~~~~~~~~~~~~~~~~~
> lib/setup.c: In function ‘__test_error’:
> lib/setup.c:44:9: error: format not a string literal and no format arguments [-Werror=format-security]
>    44 |         ksft_test_result_error(buf);
>       |         ^~~~~~~~~~~~~~~~~~~~~~
> lib/setup.c: In function ‘__test_skip’:
> lib/setup.c:50:9: error: format not a string literal and no format arguments [-Werror=format-security]
>    50 |         ksft_test_result_skip(buf);
>       |         ^~~~~~~~~~~~~~~~~~~~~
> cc1: some warnings being treated as errors

As the buffer was already pre-printed into, print it as a string
rather than a format-string.

Fixes: cfbab37b3d ("selftests/net: Add TCP-AO library")
Signed-off-by: Dmitry Safonov <0x7f454c46@gmail.com>
Reported-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2024-04-16 13:35:06 +02:00
..
lib selftests/tcp_ao: Printing fixes to confirm with format-security 2024-04-16 13:35:06 +02:00
.gitignore selftests/net: Add TCP-AO library 2023-12-17 10:41:54 +00:00
bench-lookups.c selftest/tcp-ao: Set routes in a proper VRF table id 2024-01-02 13:27:48 +00:00
config selftests: tcp_ao: add a config file 2024-01-25 15:57:17 -08:00
connect-deny.c selftests/net: Fix various spelling mistakes in TCP-AO tests 2023-12-22 22:13:00 +00:00
connect.c selftests/net: Add TCP-AO library 2023-12-17 10:41:54 +00:00
icmps-accept.c selftests/net: Add TCP-AO ICMPs accept test 2023-12-17 10:41:54 +00:00
icmps-discard.c selftests/net: Add TCP-AO ICMPs accept test 2023-12-17 10:41:54 +00:00
key-management.c selftests/net: Rectify key counters checks 2024-01-31 16:33:30 -08:00
Makefile selftests/net/tcp-ao: Use LDLIBS instead of LDFLAGS 2024-01-11 16:31:04 -08:00
restore.c selftests/net: Add TCP_REPAIR TCP-AO tests 2023-12-17 10:41:54 +00:00
rst.c selftests/tcp_ao: Make RST tests less flaky 2024-04-16 13:35:05 +02:00
self-connect.c selftests/net: Add TCP-AO selfconnect/simultaneous connect test 2023-12-17 10:41:55 +00:00
seq-ext.c selftests/net: Add SEQ number extension test 2023-12-17 10:41:54 +00:00
setsockopt-closed.c selftests/tcp_ao: Zero-init tcp_ao_info_opt 2024-04-16 13:35:05 +02:00
settings selftests: tcp_ao: set the timeout to 2 minutes 2024-01-25 16:00:50 -08:00
unsigned-md5.c selftests/net: Amend per-netns counter checks 2024-02-06 10:35:29 +01:00