From: Eric Biggers <ebiggers@kernel.org>
To: linux-crypto@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Ard Biesheuvel <ardb@kernel.org>,
"Jason A . Donenfeld" <Jason@zx2c4.com>,
Herbert Xu <herbert@gondor.apana.org.au>
Subject: Re: [PATCH] lib/crypto: tests: Migrate ChaCha20Poly1305 self-test to KUnit
Date: Mon, 30 Mar 2026 12:38:02 -0700 [thread overview]
Message-ID: <20260330193802.GC4303@sol> (raw)
In-Reply-To: <20260327224229.137532-1-ebiggers@kernel.org>
On Fri, Mar 27, 2026 at 03:42:29PM -0700, Eric Biggers wrote:
> Move the ChaCha20Poly1305 test from an ad-hoc self-test to a KUnit test.
>
> Keep the same test logic for now, just translated to KUnit.
>
> Moving to KUnit has multiple benefits, such as:
>
> - Consistency with the rest of the lib/crypto/ tests.
>
> - Kernel developers familiar with KUnit, which is used kernel-wide, can
> quickly understand the test and how to enable and run it.
>
> - The test will be automatically run by anyone using
> lib/crypto/.kunitconfig or KUnit's all_tests.config.
>
> - Results are reported using the standard KUnit mechanism.
>
> - It eliminates one of the few remaining back-references to crypto/ from
> lib/crypto/, specifically a reference to CONFIG_CRYPTO_SELFTESTS.
>
> Signed-off-by: Eric Biggers <ebiggers@kernel.org>
> ---
> include/crypto/chacha20poly1305.h | 2 -
> lib/crypto/.kunitconfig | 1 +
> lib/crypto/Makefile | 1 -
> lib/crypto/chacha20poly1305.c | 14 -
> lib/crypto/tests/Kconfig | 10 +
> lib/crypto/tests/Makefile | 1 +
> .../chacha20poly1305_kunit.c} | 1493 +++++++++--------
> 7 files changed, 760 insertions(+), 762 deletions(-)
> rename lib/crypto/{chacha20poly1305-selftest.c => tests/chacha20poly1305_kunit.c} (91%)
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git/log/?h=libcrypto-next
- Eric
prev parent reply other threads:[~2026-03-30 19:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-27 22:42 [PATCH] lib/crypto: tests: Migrate ChaCha20Poly1305 self-test to KUnit Eric Biggers
2026-03-30 17:26 ` Ard Biesheuvel
2026-03-30 19:38 ` Eric Biggers [this message]
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=20260330193802.GC4303@sol \
--to=ebiggers@kernel.org \
--cc=Jason@zx2c4.com \
--cc=ardb@kernel.org \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.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