mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kees Cook <kees@kernel.org>
To: Tamir Duberstein <tamird@gmail.com>
Cc: David Gow <davidgow@google.com>,
	Shuah Khan <skhan@linuxfoundation.org>,
	Luis Felipe Hernandez <luis.hernandez093@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Shuah Khan <shuah@kernel.org>,
	linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH v5 2/2] lib/prime_numbers: convert self-test to KUnit
Date: Mon, 10 Feb 2025 18:37:25 -0800	[thread overview]
Message-ID: <202502101836.2B3E7BC4@keescook> (raw)
In-Reply-To: <20250208-prime_numbers-kunit-convert-v5-2-b0cb82ae7c7d@gmail.com>

On Sat, Feb 08, 2025 at 09:44:39PM -0500, Tamir Duberstein wrote:
> Extract a private header and convert the prime_numbers self-test to a
> KUnit test. I considered parameterizing the test using
> `KUNIT_CASE_PARAM` but didn't see how it was possible since the test
> logic is entangled with the test parameter generation logic.
> 
> Signed-off-by: Tamir Duberstein <tamird@gmail.com>
> ---
>  lib/Kconfig.debug                            | 14 +++++
>  lib/math/prime_numbers.c                     | 87 +++++-----------------------
>  lib/math/prime_numbers_private.h             | 17 ++++++
>  lib/math/tests/Makefile                      |  1 +
>  lib/math/tests/prime_numbers_kunit.c         | 59 +++++++++++++++++++
>  tools/testing/selftests/lib/config           |  1 -
>  tools/testing/selftests/lib/prime_numbers.sh |  4 --
>  7 files changed, 106 insertions(+), 77 deletions(-)

Thanks! I've applied this and rebased it onto:
https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git/log/?h=for-next/move-kunit-tests

-- 
Kees Cook

  reply	other threads:[~2025-02-11  2:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-09  2:44 [PATCH v5 0/2] " Tamir Duberstein
2025-02-09  2:44 ` [PATCH v5 1/2] lib/math: Hook up tests/Makefile Tamir Duberstein
2025-02-09  2:44 ` [PATCH v5 2/2] lib/prime_numbers: convert self-test to KUnit Tamir Duberstein
2025-02-11  2:37   ` Kees Cook [this message]
2025-02-11  2:47     ` Tamir Duberstein
2025-02-11  2:52       ` Tamir Duberstein
2025-02-11 11:51         ` Tamir Duberstein
2025-02-11 16:38           ` Kees Cook
2025-02-11 16:39             ` 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=202502101836.2B3E7BC4@keescook \
    --to=kees@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=davidgow@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=luis.hernandez093@gmail.com \
    --cc=shuah@kernel.org \
    --cc=skhan@linuxfoundation.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®