linux/lib/tests
Eric Biggers b73abee375 lib: Move SipHash into lib/crypto/
The addition of SipHash to lib/ predated the existence of the
lib/crypto/ directory.  Since SipHash is a cryptographic algorithm, move
it from the top-level lib/ directory to lib/crypto/.

(This does mean HalfSipHash comes with it too, as it's in the same
files.  But lib/crypto/ still seems like the proper place for both.)

Specifically:

- Move both siphash.c and siphash_kunit.c.  Keep the header
  <linux/siphash.h> as-is for now.

- Drop the dedicated MAINTAINERS entry for SipHash, as per the
  suggestion from Jason
  (https://lore.kernel.org/r/asB7QVFMlgKgbje2@zx2c4.com/).  The C files
  now just fold up to the "CRYPTO LIBRARY" entry.  Add the header
  explicitly, as it otherwise would be left unmaintained.

- Move the kconfig option that controls the KUnit test.  Put
  "CRYPTO_LIB" in its name and update the prompt and help text to make
  it consistent with the other crypto library test options.

- Enable the KUnit test in lib/crypto/.kunitconfig.

- Link to siphash.rst from the appropriate place in libcrypto-hash.rst.

- Use obj-y instead of lib-y, for consistency with the fact that
  currently lib/crypto/ doesn't use kbuild's support for library file
  goals.  We could keep it as lib-y, but virtually every kernel needs
  SipHash support anyway (with vsprintf, printk, IPv4, IPv6, etc.
  depending on it) so there is no practical difference in this case.

Acked-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Jason A. Donenfeld <Jason@zx2c4.com>
Link: https://patch.msgid.link/20261003162827.155527-1-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
2026-10-03 18:30:12 +02:00
..
module
base64_kunit.c
bitfield_kunit.c
bitops_kunit.c
blackhole_dev_kunit.c net: Use helpers to get/set UDP len tree-wide 2026-07-22 13:47:02 +02:00
checksum_kunit.c
cmdline_kunit.c lib/cmdline_kunit: add test case for memparse() 2026-05-28 21:24:50 -07:00
cpumask_kunit.c
ffs_kunit.c
fortify_kunit.c string: Remove strncpy() from the kernel 2026-06-18 16:39:31 -07:00
glob_kunit.c
hashtable_test.c
is_signed_type_kunit.c
kfifo_kunit.c
kunit_iov_iter.c treewide: refresh kmalloc_obj() conversions 2026-09-04 21:37:00 -07:00
list-private-test.c
list-test.c
liveupdate.c liveupdate: Reference count incoming FLB data 2026-06-01 02:31:38 +03:00
longest_symbol_kunit.c
Makefile lib: Move SipHash into lib/crypto/ 2026-10-03 18:30:12 +02:00
memcpy_kunit.c
min_heap_kunit.c
overflow_kunit.c
printf_kunit.c Merge branch 'for-7.2-vsprintf-pmM-uppercase' into for-linus 2026-06-17 08:58:22 +02:00
random32_kunit.c lib/random32: convert selftest to KUnit 2026-08-03 21:10:09 -07:00
randstruct_kunit.c
scanf_kunit.c
seq_buf_kunit.c seq_buf: export seq_buf_putmem_hex() and add KUnit tests 2026-05-28 21:24:41 -07:00
shdi3_kunit.c lib: kunit: add tests for __ashldi3(), __ashrdi3(), and __lshrdi3() 2026-05-28 21:24:51 -07:00
slub_kunit.c slub_kunit: extend the test for kfree_rcu_nolock() 2026-08-04 12:18:29 +02:00
stackinit_kunit.c
string_helpers_kunit.c lib/tests: string_helpers: don't use "proxy" headers 2026-05-28 21:24:42 -07:00
string_kunit.c lib/string_kunit: extend benchmarks to strnlen() and chr searches 2026-04-04 18:42:44 -06:00
test_bits.c
test_fprobe.c
test_hash.c
test_kprobes.c test_kprobes: clear kprobes between test runs 2026-05-08 10:03:44 +09:00
test_linear_ranges.c
test_list_sort.c
test_ratelimit.c lib/tests: test_ratelimit: fix stress test thread lifecycle and leak 2026-06-25 13:28:37 +02:00
test_sort.c
usercopy_kunit.c
util_macros_kunit.c
uuid_kunit.c lib/uuid_kunit: add tests for the four random UUID/GUID generators 2026-05-28 21:24:58 -07:00