From: Petr Mladek <pmladek@suse.com>
To: Tamir Duberstein <tamird@gmail.com>
Cc: David Gow <davidgow@google.com>,
Steven Rostedt <rostedt@goodmis.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
Andrew Morton <akpm@linux-foundation.org>,
Shuah Khan <shuah@kernel.org>,
Geert Uytterhoeven <geert@linux-m68k.org>,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH v9 6/6] scanf: further break kunit into test cases
Date: Fri, 14 Mar 2025 14:21:22 +0100 [thread overview]
Message-ID: <Z9QtUoFdCoTXnkzE@pathway.suse.cz> (raw)
In-Reply-To: <20250307-scanf-kunit-convert-v9-6-b98820fa39ff@gmail.com>
On Fri 2025-03-07 06:27:39, Tamir Duberstein wrote:
> This gives us more granular test output.
>
> Output before:
>
> > KTAP version 1
> > 1..1
> > KTAP version 1
> > # Subtest: scanf
> > # module: scanf_kunit
> > 1..10
> > ok 1 numbers_simple
> > KTAP version 1
> > # Subtest: numbers_list
> > ok 1 " "
> > ok 2 ":"
> > ok 3 ","
> > ok 4 "-"
> > ok 5 "/"
> > # numbers_list: pass:5 fail:0 skip:0 total:5
> > ok 2 numbers_list
> > KTAP version 1
> > # Subtest: numbers_list_field_width_typemax
> > ok 1 " "
> > ok 2 ":"
> > ok 3 ","
> > ok 4 "-"
> > ok 5 "/"
> > # numbers_list_field_width_typemax: pass:5 fail:0 skip:0 total:5
> > ok 3 numbers_list_field_width_typemax
> > KTAP version 1
> > # Subtest: numbers_list_field_width_val_width
> > ok 1 " "
> > ok 2 ":"
> > ok 3 ","
> > ok 4 "-"
> > ok 5 "/"
> > # numbers_list_field_width_val_width: pass:5 fail:0 skip:0 total:5
> > ok 4 numbers_list_field_width_val_width
> > ok 5 numbers_slice
> > ok 6 numbers_prefix_overflow
> > ok 7 test_simple_strtoull
> > ok 8 test_simple_strtoll
> > ok 9 test_simple_strtoul
> > ok 10 test_simple_strtol
> > # scanf: pass:10 fail:0 skip:0 total:10
> > # Totals: pass:22 fail:0 skip:0 total:22
> > ok 1 scanf
>
> Output after:
>
> > KTAP version 1
> > 1..1
> > KTAP version 1
> > # Subtest: scanf
> > # module: scanf_kunit
> > 1..21
> > ok 1 numbers_simple
> > KTAP version 1
> > # Subtest: numbers_list_ll
> > ok 1 " "
> > ok 2 ":"
> > ok 3 ","
> > ok 4 "-"
> > ok 5 "/"
> > # numbers_list_ll: pass:5 fail:0 skip:0 total:5
> > ok 2 numbers_list_ll
> > KTAP version 1
> > # Subtest: numbers_list_l
> > ok 1 " "
> > ok 2 ":"
> > ok 3 ","
> > ok 4 "-"
> > ok 5 "/"
> > # numbers_list_l: pass:5 fail:0 skip:0 total:5
> > ok 3 numbers_list_l
> > KTAP version 1
> > # Subtest: numbers_list_d
> > ok 1 " "
> > ok 2 ":"
> > ok 3 ","
> > ok 4 "-"
> > ok 5 "/"
> > # numbers_list_d: pass:5 fail:0 skip:0 total:5
> > ok 4 numbers_list_d
> > KTAP version 1
> > # Subtest: numbers_list_h
> > ok 1 " "
> > ok 2 ":"
> > ok 3 ","
> > ok 4 "-"
> > ok 5 "/"
> > # numbers_list_h: pass:5 fail:0 skip:0 total:5
> > ok 5 numbers_list_h
> > KTAP version 1
> > # Subtest: numbers_list_hh
> > ok 1 " "
> > ok 2 ":"
> > ok 3 ","
> > ok 4 "-"
> > ok 5 "/"
> > # numbers_list_hh: pass:5 fail:0 skip:0 total:5
> > ok 6 numbers_list_hh
> > KTAP version 1
> > # Subtest: numbers_list_field_width_ll
> > ok 1 " "
> > ok 2 ":"
> > ok 3 ","
> > ok 4 "-"
> > ok 5 "/"
> > # numbers_list_field_width_ll: pass:5 fail:0 skip:0 total:5
> > ok 7 numbers_list_field_width_ll
> > KTAP version 1
> > # Subtest: numbers_list_field_width_l
> > ok 1 " "
> > ok 2 ":"
> > ok 3 ","
> > ok 4 "-"
> > ok 5 "/"
> > # numbers_list_field_width_l: pass:5 fail:0 skip:0 total:5
> > ok 8 numbers_list_field_width_l
> > KTAP version 1
> > # Subtest: numbers_list_field_width_d
> > ok 1 " "
> > ok 2 ":"
> > ok 3 ","
> > ok 4 "-"
> > ok 5 "/"
> > # numbers_list_field_width_d: pass:5 fail:0 skip:0 total:5
> > ok 9 numbers_list_field_width_d
> > KTAP version 1
> > # Subtest: numbers_list_field_width_h
> > ok 1 " "
> > ok 2 ":"
> > ok 3 ","
> > ok 4 "-"
> > ok 5 "/"
> > # numbers_list_field_width_h: pass:5 fail:0 skip:0 total:5
> > ok 10 numbers_list_field_width_h
> > KTAP version 1
> > # Subtest: numbers_list_field_width_hh
> > ok 1 " "
> > ok 2 ":"
> > ok 3 ","
> > ok 4 "-"
> > ok 5 "/"
> > # numbers_list_field_width_hh: pass:5 fail:0 skip:0 total:5
> > ok 11 numbers_list_field_width_hh
> > KTAP version 1
> > # Subtest: numbers_list_field_width_val_ll
> > ok 1 ""
> > ok 2 " "
> > ok 3 ":"
> > ok 4 ","
> > ok 5 "-"
> > ok 6 "/"
> > # numbers_list_field_width_val_ll: pass:6 fail:0 skip:0 total:6
> > ok 12 numbers_list_field_width_val_ll
> > KTAP version 1
> > # Subtest: numbers_list_field_width_val_l
> > ok 1 ""
> > ok 2 " "
> > ok 3 ":"
> > ok 4 ","
> > ok 5 "-"
> > ok 6 "/"
> > # numbers_list_field_width_val_l: pass:6 fail:0 skip:0 total:6
> > ok 13 numbers_list_field_width_val_l
> > KTAP version 1
> > # Subtest: numbers_list_field_width_val_d
> > ok 1 ""
> > ok 2 " "
> > ok 3 ":"
> > ok 4 ","
> > ok 5 "-"
> > ok 6 "/"
> > # numbers_list_field_width_val_d: pass:6 fail:0 skip:0 total:6
> > ok 14 numbers_list_field_width_val_d
> > KTAP version 1
> > # Subtest: numbers_list_field_width_val_h
> > ok 1 ""
> > ok 2 " "
> > ok 3 ":"
> > ok 4 ","
> > ok 5 "-"
> > ok 6 "/"
> > # numbers_list_field_width_val_h: pass:6 fail:0 skip:0 total:6
> > ok 15 numbers_list_field_width_val_h
> > KTAP version 1
> > # Subtest: numbers_list_field_width_val_hh
> > ok 1 ""
> > ok 2 " "
> > ok 3 ":"
> > ok 4 ","
> > ok 5 "-"
> > ok 6 "/"
> > # numbers_list_field_width_val_hh: pass:6 fail:0 skip:0 total:6
> > ok 16 numbers_list_field_width_val_hh
> > ok 17 numbers_prefix_overflow
> > ok 18 test_simple_strtoull
> > ok 19 test_simple_strtoll
> > ok 20 test_simple_strtoul
> > ok 21 test_simple_strtol
> > # scanf: pass:21 fail:0 skip:0 total:21
> > # Totals: pass:86 fail:0 skip:0 total:86
> > ok 1 scanf
>
> Signed-off-by: Tamir Duberstein <tamird@gmail.com>
Thanks for trying this. But I personally do not find this as a big win.
It causes that the test log is longer than one screen and thus harder
to review.
It might be fine when running only this test and running it only once.
But I think that it is quite common to run more tests and then
it is easy to get lost.
I guess that there are tools for handling the KTAP format which might
make this easier but...
So, I would prefer to avoid this patch.
Best Regards,
Petr
next prev parent reply other threads:[~2025-03-14 13:21 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-07 11:27 [PATCH v9 0/6] scanf: convert self-test to KUnit Tamir Duberstein
2025-03-07 11:27 ` [PATCH v9 1/6] scanf: implicate test line in failure messages Tamir Duberstein
2025-03-07 11:27 ` [PATCH v9 2/6] scanf: remove redundant debug logs Tamir Duberstein
2025-03-07 11:27 ` [PATCH v9 3/6] scanf: convert self-test to KUnit Tamir Duberstein
2025-03-07 11:27 ` [PATCH v9 4/6] scanf: break kunit into test cases Tamir Duberstein
2025-03-14 12:55 ` Petr Mladek
2025-03-07 11:27 ` [PATCH v9 5/6] scanf: tidy header `#include`s Tamir Duberstein
2025-03-07 17:34 ` Andy Shevchenko
2025-03-07 17:39 ` Andy Shevchenko
2025-03-07 17:42 ` Tamir Duberstein
2025-03-14 13:04 ` Petr Mladek
2025-03-07 11:27 ` [PATCH v9 6/6] scanf: further break kunit into test cases Tamir Duberstein
2025-03-14 13:21 ` Petr Mladek [this message]
2025-03-14 13:27 ` Tamir Duberstein
2025-03-14 13:29 ` [PATCH v9 0/6] scanf: convert self-test to KUnit Petr Mladek
2025-03-14 20:45 ` Kees Cook
2025-03-14 20:50 ` Tamir Duberstein
2025-03-17 10:34 ` Petr Mladek
2025-03-14 20:59 ` (subset) " Kees Cook
2025-03-14 21:31 ` Tamir Duberstein
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z9QtUoFdCoTXnkzE@pathway.suse.cz \
--to=pmladek@suse.com \
--cc=akpm@linux-foundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=davidgow@google.com \
--cc=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=rostedt@goodmis.org \
--cc=senozhatsky@chromium.org \
--cc=shuah@kernel.org \
--cc=tamird@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®