From: Tamir Duberstein <tamird@gmail.com>
To: David Gow <davidgow@google.com>, Petr Mladek <pmladek@suse.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>
Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
Tamir Duberstein <tamird@gmail.com>,
Geert Uytterhoeven <geert@linux-m68k.org>
Subject: [PATCH v4 0/2] scanf: convert self-test to KUnit
Date: Fri, 07 Feb 2025 06:49:10 -0500 [thread overview]
Message-ID: <20250207-scanf-kunit-convert-v4-0-a23e2afaede8@gmail.com> (raw)
This is one of just 3 remaining "Test Module" kselftests (the others
being bitmap and printf), the rest having been converted to KUnit. In
addition to the enclosed patch, please consider this an RFC on the
removal of the "Test Module" kselftest machinery.
I tested this using:
$ tools/testing/kunit/kunit.py run --arch arm64 --make_options LLVM=1 scanf
Signed-off-by: Tamir Duberstein <tamird@gmail.com>
---
Changes in v4:
- Bake `test` into various macros, greatly reducing diff noise.
- Revert control flow changes.
- Link to v3: https://lore.kernel.org/r/20250204-scanf-kunit-convert-v3-0-386d7c3ee714@gmail.com
Changes in v3:
- Reduce diff noise in lib/Makefile. (Petr Mladek)
- Split `scanf_test` into a few test cases. New output:
: =================== scanf (10 subtests) ====================
: [PASSED] numbers_simple
: ====================== numbers_list =======================
: [PASSED] delim=" "
: [PASSED] delim=":"
: [PASSED] delim=","
: [PASSED] delim="-"
: [PASSED] delim="/"
: ================== [PASSED] numbers_list ===================
: ============ numbers_list_field_width_typemax =============
: [PASSED] delim=" "
: [PASSED] delim=":"
: [PASSED] delim=","
: [PASSED] delim="-"
: [PASSED] delim="/"
: ======== [PASSED] numbers_list_field_width_typemax =========
: =========== numbers_list_field_width_val_width ============
: [PASSED] delim=" "
: [PASSED] delim=":"
: [PASSED] delim=","
: [PASSED] delim="-"
: [PASSED] delim="/"
: ======= [PASSED] numbers_list_field_width_val_width ========
: [PASSED] numbers_slice
: [PASSED] numbers_prefix_overflow
: [PASSED] test_simple_strtoull
: [PASSED] test_simple_strtoll
: [PASSED] test_simple_strtoul
: [PASSED] test_simple_strtol
: ====================== [PASSED] scanf ======================
: ============================================================
: Testing complete. Ran 22 tests: passed: 22
: Elapsed time: 5.517s total, 0.001s configuring, 5.440s building, 0.067s running
- Link to v2: https://lore.kernel.org/r/20250203-scanf-kunit-convert-v2-1-277a618d804e@gmail.com
Changes in v2:
- Rename lib/{test_scanf.c => scanf_kunit.c}. (Andy Shevchenko)
- Link to v1: https://lore.kernel.org/r/20250131-scanf-kunit-convert-v1-1-0976524f0eba@gmail.com
---
Tamir Duberstein (2):
scanf: convert self-test to KUnit
scanf: break kunit into test cases
MAINTAINERS | 2 +-
arch/m68k/configs/amiga_defconfig | 1 -
arch/m68k/configs/apollo_defconfig | 1 -
arch/m68k/configs/atari_defconfig | 1 -
arch/m68k/configs/bvme6000_defconfig | 1 -
arch/m68k/configs/hp300_defconfig | 1 -
arch/m68k/configs/mac_defconfig | 1 -
arch/m68k/configs/multi_defconfig | 1 -
arch/m68k/configs/mvme147_defconfig | 1 -
arch/m68k/configs/mvme16x_defconfig | 1 -
arch/m68k/configs/q40_defconfig | 1 -
arch/m68k/configs/sun3_defconfig | 1 -
arch/m68k/configs/sun3x_defconfig | 1 -
arch/powerpc/configs/ppc64_defconfig | 1 -
lib/Kconfig.debug | 20 ++-
lib/Makefile | 2 +-
lib/{test_scanf.c => scanf_kunit.c} | 260 +++++++++++++++++------------------
tools/testing/selftests/lib/Makefile | 2 +-
tools/testing/selftests/lib/config | 1 -
tools/testing/selftests/lib/scanf.sh | 4 -
20 files changed, 149 insertions(+), 155 deletions(-)
---
base-commit: a86bf2283d2c9769205407e2b54777c03d012939
change-id: 20250131-scanf-kunit-convert-f70dc33bb34c
Best regards,
--
Tamir Duberstein <tamird@gmail.com>
next reply other threads:[~2025-02-07 11:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-07 11:49 Tamir Duberstein [this message]
2025-02-07 11:49 ` [PATCH v4 1/2] scanf: convert self-test to KUnit Tamir Duberstein
2025-02-07 14:36 ` Tamir Duberstein
2025-02-07 11:49 ` [PATCH v4 2/2] scanf: break kunit into test cases 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=20250207-scanf-kunit-convert-v4-0-a23e2afaede8@gmail.com \
--to=tamird@gmail.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=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=senozhatsky@chromium.org \
--cc=shuah@kernel.org \
/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