Message ID | d71aa14c2a136d9faa7743b6bde414495f4b763c.1693216959.git.maciej.wieczor-retman@intel.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 287d29827ffc97e6978fa030b7412330a93dd38a |
Headers | show |
Series | Add printf attribute to kselftest functions | expand |
On Mon, 28 Aug 2023, Wieczor-Retman, Maciej wrote: > Ksft_print_msg() inside test_openat2_flags() uses the wrong format > specifier for printing test.how->flags variable. > > Change the format specifier to %llX so it matches the printed variable. > > Signed-off-by: Wieczor-Retman, Maciej <maciej.wieczor-retman@intel.com> > --- > tools/testing/selftests/openat2/openat2_test.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/openat2/openat2_test.c b/tools/testing/selftests/openat2/openat2_test.c > index 7fb902099de4..9024754530b2 100644 > --- a/tools/testing/selftests/openat2/openat2_test.c > +++ b/tools/testing/selftests/openat2/openat2_test.c > @@ -300,7 +300,7 @@ void test_openat2_flags(void) > > ksft_print_msg("openat2 unexpectedly returned "); > if (fdpath) > - ksft_print_msg("%d['%s'] with %X (!= %X)\n", > + ksft_print_msg("%d['%s'] with %X (!= %llX)\n", > fd, fdpath, fdflags, > test->how.flags); > else > Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
diff --git a/tools/testing/selftests/openat2/openat2_test.c b/tools/testing/selftests/openat2/openat2_test.c index 7fb902099de4..9024754530b2 100644 --- a/tools/testing/selftests/openat2/openat2_test.c +++ b/tools/testing/selftests/openat2/openat2_test.c @@ -300,7 +300,7 @@ void test_openat2_flags(void) ksft_print_msg("openat2 unexpectedly returned "); if (fdpath) - ksft_print_msg("%d['%s'] with %X (!= %X)\n", + ksft_print_msg("%d['%s'] with %X (!= %llX)\n", fd, fdpath, fdflags, test->how.flags); else
Ksft_print_msg() inside test_openat2_flags() uses the wrong format specifier for printing test.how->flags variable. Change the format specifier to %llX so it matches the printed variable. Signed-off-by: Wieczor-Retman, Maciej <maciej.wieczor-retman@intel.com> --- tools/testing/selftests/openat2/openat2_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)