lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJ-ks9mE21a4tNn8yp6vUy-iME4fxngDEr+2xLWj6Bk7dOXFYg@mail.gmail.com>
Date: Mon, 10 Feb 2025 10:24:16 -0500
From: Tamir Duberstein <tamird@...il.com>
To: David Gow <davidgow@...gle.com>, Petr Mladek <pmladek@...e.com>, 
	Steven Rostedt <rostedt@...dmis.org>, Andy Shevchenko <andriy.shevchenko@...ux.intel.com>, 
	Rasmus Villemoes <linux@...musvillemoes.dk>, Sergey Senozhatsky <senozhatsky@...omium.org>, 
	Andrew Morton <akpm@...ux-foundation.org>, Shuah Khan <shuah@...nel.org>
Cc: Geert Uytterhoeven <geert@...ux-m68k.org>, linux-kernel@...r.kernel.org, 
	linux-kselftest@...r.kernel.org
Subject: Re: [PATCH v5 1/2] scanf: convert self-test to KUnit

On Mon, Feb 10, 2025 at 10:00 AM Tamir Duberstein <tamird@...il.com> wrote:
>
> Convert the scanf() self-test to a KUnit test.
>
> In the interest of keeping the patch reasonably-sized this doesn't
> refactor the tests into proper parameterized tests - it's all one big
> test case.
>
> Acked-by: Petr Mladek <pmladek@...e.com>
> Reviewed-by: David Gow <davidgow@...gle.com>
> Signed-off-by: Tamir Duberstein <tamird@...il.com>
> ---
>  MAINTAINERS                          |   2 +-
>  lib/Kconfig.debug                    |  12 +-
>  lib/Makefile                         |   2 +-
>  lib/{test_scanf.c => scanf_kunit.c}  | 228 ++++++++++++++++-------------------
>  tools/testing/selftests/lib/Makefile |   2 +-
>  tools/testing/selftests/lib/config   |   1 -
>  tools/testing/selftests/lib/scanf.sh |   4 -
>  7 files changed, 118 insertions(+), 133 deletions(-)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 25c86f47353d..ab1d90c66c02 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -25411,8 +25411,8 @@ R:      Sergey Senozhatsky <senozhatsky@...omium.org>
>  S:     Maintained
>  T:     git git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux.git
>  F:     Documentation/core-api/printk-formats.rst
> +F:     lib/scanf_kunit.c
>  F:     lib/test_printf.c
> -F:     lib/test_scanf.c
>  F:     lib/vsprintf.c
>
>  VT1211 HARDWARE MONITOR DRIVER
> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> index 1af972a92d06..d35b60203856 100644
> --- a/lib/Kconfig.debug
> +++ b/lib/Kconfig.debug
> @@ -2427,6 +2427,15 @@ config ASYNC_RAID6_TEST
>  config TEST_HEXDUMP
>         tristate "Test functions located in the hexdump module at runtime"
>
> +config SCANF_KUNIT_TEST
> +       tristate "KUnit test scanf() family of functions at runtime" if !KUNIT_ALL_TESTS
> +       depends on KUNIT
> +       default KUNIT_ALL_TESTS
> +       help
> +         Enable this option to test the scanf functions at boot.
> +
> +         If unsure, say N.

Ugh, I meant to change this "at boot" to "at runtime".

Petr, if you are willing to take this through printf and apply this
tiny edit, I'd really appreciate it.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ