On Wed, Mar 5, 2025 at 4:56 AM Petr Mladek <pmladek@xxxxxxxx> wrote: > > On Fri 2025-02-14 11:19:58, Tamir Duberstein wrote: > > This improves the failure output by pointing to the failing line at the > > top level of the test. > > > > Signed-off-by: Tamir Duberstein <tamird@xxxxxxxxx> > > --- > > lib/test_scanf.c | 66 ++++++++++++++++++++++++++++---------------------------- > > 1 file changed, 33 insertions(+), 33 deletions(-) > > > > diff --git a/lib/test_scanf.c b/lib/test_scanf.c > > index 44f8508c9d88..d1664e0d0138 100644 > > --- a/lib/test_scanf.c > > +++ b/lib/test_scanf.c > > @@ -24,12 +24,12 @@ static char *test_buffer __initdata; > > static char *fmt_buffer __initdata; > > static struct rnd_state rnd_state __initdata; > > > > -typedef int (*check_fn)(const void *check_data, const char *string, > > - const char *fmt, int n_args, va_list ap); > > +typedef int (*check_fn)(const char *file, const int line, const void *check_data, > > + const char *string, const char *fmt, int n_args, va_list ap); > > > > -static void __scanf(4, 6) __init > > -_test(check_fn fn, const void *check_data, const char *string, const char *fmt, > > - int n_args, ...) > > +static void __scanf(6, 0) __init > > This should be: > > static void __scanf(6, 8) __init > > The zero (0) is used when the parameters are passed via the va_list. > The value must be the position of the first parameter when they are passed > via the variable list of parameters, aka (...). > > Otherwise, it triggers the warnings reported by the lkp@xxxxxxxxx > kernel test robot, see > https://lore.kernel.org/r/202502160245.KUrryBJR-lkp@xxxxxxxxx > > Best Regards, > Petr Thanks for explaining!