<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/stable/linux.git/lib/tests/random32_kunit.c, branch master</title>
<subtitle>Linux kernel stable tree</subtitle>
<id>https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=master</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/'/>
<updated>2026-08-04T04:10:09+00:00</updated>
<entry>
<title>lib/random32: convert selftest to KUnit</title>
<updated>2026-08-04T04:10:09+00:00</updated>
<author>
<name>Kir Chou</name>
<email>note351@hotmail.com</email>
</author>
<published>2026-07-03T05:00:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=108646f7d9ace1521abc09ea863e9c9687c61136'/>
<id>urn:sha1:108646f7d9ace1521abc09ea863e9c9687c61136</id>
<content type='text'>
Convert the existing prandom selftest (lib/random32.c) to use the KUnit
framework (lib/tests/random32_kunit.c).  Unlike typical KUnit tests, this
file is directly #included into lib/random32.c.

The new test:
- Removes the legacy CONFIG_RANDOM32_SELFTEST from lib/random32.c.
- Adds CONFIG_PRANDOM_KUNIT_TEST (defaulting to KUNIT_ALL_TESTS).
- Moves the test logic to lib/tests/random32_kunit.c.

This commit is verified by `./tools/testing/kunit/kunit.py run`
with the .kunit/.kunitconfig:

CONFIG_KUNIT=y
CONFIG_PRANDOM_KUNIT_TEST=y

Link: https://lore.kernel.org/20260703050100.23944-1-note351@hotmail.com
Signed-off-by: Kir Chou &lt;note351@hotmail.com&gt;
Reviewed-by: David Gow &lt;davidgow@google.com&gt;
Cc: Brendan Higgins &lt;brendan.higgins@linux.dev&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Cc: Jakub Kacinski &lt;kuba@kernel.org&gt;
Cc: Kuan-Wei Chiu &lt;visitorckw@gmail.com&gt;
Cc: Paolo Abeni &lt;pabeni@redhat.com&gt;
Cc: Simon Horman &lt;horms@kernel.org&gt;
Cc: Thomas Weißschuh &lt;thomas.weissschuh@linutronix.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
</feed>
