Skip to contentSkip to conversation

move-lib-kunit for v6.15-rc1

GIT PULL Merged Kees Cook 3 participants 4 messages Mar 17, 2025 – Mar 25, 2025

lore
Share & tools
lore

Kees Cook

author
#0 lore raw

Hi Linus,

Please pull the move-lib-kunit tree for v6.15-rc1. This is a one-off tree to coordinate the move of selftests out of lib/ and into lib/tests/. A separate tree was used for this to keep the paths sane with all the work in the same place. Doing this across multiple trees was going to be very difficult, so any on-going updates were collected here to try to avoid merge conflicts. I think only one small conflict remains, just today, detailed here:
https://lore.kernel.org/linux-next/[email protected]/
sfr's resolution looks correct.

Thanks!

-Kees

The following changes since commit a64dcfb451e254085a7daee5fe51bf22959d52d3:

Linux 6.14-rc2 (2025-02-09 12:45:03 -0800)

are available in the Git repository at:

https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git tags/move-lib-kunit-v6.15-rc1

for you to fetch changes up to d62f8c95470c395ab6fd8f344ff431a5f4ce0da5:

scanf: break kunit into test cases (2025-03-14 13:56:15 -0700)

----------------------------------------------------------------
move-lib-kunit for v6.15-rc1

- move lib/ selftests into lib/tests/ (Kees Cook, Gabriela Bittencourt, Luis Felipe Hernandez, Lukas Bulwahn, Tamir Duberstein)

- lib/math: Add int_log test suite (Bruno Sobreira França)

- lib/math: Add Kunit test suite for gcd() (Yu-Chun Lin)

- lib/tests/kfifo_kunit.c: add tests for the kfifo structure (Diego Vieira)

- unicode: refactor selftests into KUnit (Gabriela Bittencourt)

- lib/prime_numbers: convert self-test to KUnit (Tamir Duberstein)

- printf: convert self-test to KUnit (Tamir Duberstein)

- scanf: convert self-test to KUnit (Tamir Duberstein)

----------------------------------------------------------------
Bruno Sobreira França (1):
lib/math: Add int_log test suite

Diego Vieira (1):
lib/tests/kfifo_kunit.c: add tests for the kfifo structure

Gabriela Bittencourt (2):
unicode: kunit: refactor selftest to kunit tests
unicode: kunit: change tests filename and path

Kees Cook (5):
lib: Move KUnit tests into tests/ subdirectory kunit/overflow: Fix DEFINE_FLEX tests for counted_by kunit/stackinit: Use fill byte different from Clang i386 pattern kunit/fortify: Expand testing of __compiletime_strlen() kunit/fortify: Replace "volatile" with OPTIMIZER_HIDE_VAR()

Luis Felipe Hernandez (1):
lib: math: Move KUnit tests into tests/ subdir

Lukas Bulwahn (1):
MAINTAINERS: adjust entries in FORTIFY_SOURCE and KERNEL HARDENING

Tamir Duberstein (9):
lib/prime_numbers: convert self-test to KUnit
selftests: remove reference to prime_numbers.sh
printf: convert self-test to KUnit
printf: break kunit into test cases
printf: implicate test line in failure messages
scanf: implicate test line in failure messages
scanf: remove redundant debug logs
scanf: convert self-test to KUnit
scanf: break kunit into test cases

Yu-Chun Lin (1):
lib/math: Add Kunit test suite for gcd()

 Documentation/core-api/printk-formats.rst          |   4 +-
 Documentation/dev-tools/kselftest.rst              |   2 +-
 MAINTAINERS                                        |  24 +-
 fs/unicode/Kconfig                                 |   5 +-
 fs/unicode/Makefile                                |   2 +-
 fs/unicode/tests/.kunitconfig                      |   3 +
 fs/unicode/{utf8-selftest.c => tests/utf8_kunit.c} | 153 ++++---
 fs/unicode/utf8-norm.c                             |   2 +-
 lib/Kconfig.debug                                  |  78 +++-
 lib/Makefile                                       |  41 +-
 lib/math/Makefile                                  |   5 +-
 lib/math/prime_numbers.c                           |  91 +----
 lib/math/prime_numbers_private.h                   |  16 +
 lib/math/tests/Makefile                            |   8 +-
 lib/math/tests/gcd_kunit.c                         |  56 +++
 lib/math/tests/int_log_kunit.c                     |  74 ++++
 lib/math/tests/prime_numbers_kunit.c               |  59 +++
 .../{rational-test.c => tests/rational_kunit.c}    |   0
 lib/tests/Makefile                                 |  43 ++
 lib/{ => tests}/bitfield_kunit.c                   |   0
 lib/{ => tests}/checksum_kunit.c                   |   0
 lib/{ => tests}/cmdline_kunit.c                    |   0
 lib/{ => tests}/cpumask_kunit.c                    |   0
 lib/{ => tests}/crc_kunit.c                        |   0
 lib/{ => tests}/fortify_kunit.c                    | 156 +++++---
 lib/{ => tests}/hashtable_test.c                   |   0
 lib/{ => tests}/is_signed_type_kunit.c             |   0
 lib/tests/kfifo_kunit.c                            | 224 +++++++++++
 lib/{ => tests}/kunit_iov_iter.c                   |   0
 lib/{ => tests}/list-test.c                        |   0
 lib/{ => tests}/memcpy_kunit.c                     |   0
 lib/{ => tests}/overflow_kunit.c                   |  38 +-
 lib/{test_printf.c => tests/printf_kunit.c}        | 442 +++++++++------------
 lib/{test_scanf.c => tests/scanf_kunit.c}          | 295 +++++++-------
 lib/{ => tests}/siphash_kunit.c                    |   0
 lib/{ => tests}/slub_kunit.c                       |   0
 lib/{ => tests}/stackinit_kunit.c                  |  30 +-
 lib/{ => tests}/string_helpers_kunit.c             |   0
 lib/{ => tests}/string_kunit.c                     |   0
 lib/{ => tests}/test_bits.c                        |   0
 lib/{ => tests}/test_fprobe.c                      |   0
 lib/{ => tests}/test_hash.c                        |   0
 lib/{ => tests}/test_kprobes.c                     |   0
 lib/{ => tests}/test_linear_ranges.c               |   0
 lib/{ => tests}/test_list_sort.c                   |   0
 lib/{ => tests}/test_sort.c                        |   0
 lib/{ => tests}/usercopy_kunit.c                   |   0
 lib/{ => tests}/util_macros_kunit.c                |   0
 tools/testing/selftests/kselftest/module.sh        |   2 +-
 tools/testing/selftests/lib/Makefile               |   2 +-
 tools/testing/selftests/lib/config                 |   3 -
 tools/testing/selftests/lib/prime_numbers.sh       |   4 -
 tools/testing/selftests/lib/printf.sh              |   4 -
 tools/testing/selftests/lib/scanf.sh               |   4 -
 54 files changed, 1148 insertions(+), 722 deletions(-)
 create mode 100644 fs/unicode/tests/.kunitconfig
 rename fs/unicode/{utf8-selftest.c => tests/utf8_kunit.c} (63%)
 create mode 100644 lib/math/prime_numbers_private.h
 create mode 100644 lib/math/tests/gcd_kunit.c
 create mode 100644 lib/math/tests/int_log_kunit.c
 create mode 100644 lib/math/tests/prime_numbers_kunit.c
 rename lib/math/{rational-test.c => tests/rational_kunit.c} (100%)
 rename lib/{ => tests}/bitfield_kunit.c (100%)
 rename lib/{ => tests}/checksum_kunit.c (100%)
 rename lib/{ => tests}/cmdline_kunit.c (100%)
 rename lib/{ => tests}/cpumask_kunit.c (100%)
 rename lib/{ => tests}/crc_kunit.c (100%)
 rename lib/{ => tests}/fortify_kunit.c (90%)
 rename lib/{ => tests}/hashtable_test.c (100%)
 rename lib/{ => tests}/is_signed_type_kunit.c (100%)
 create mode 100644 lib/tests/kfifo_kunit.c
 rename lib/{ => tests}/kunit_iov_iter.c (100%)
 rename lib/{ => tests}/list-test.c (100%)
 rename lib/{ => tests}/memcpy_kunit.c (100%)
 rename lib/{ => tests}/overflow_kunit.c (96%)
 rename lib/{test_printf.c => tests/printf_kunit.c} (71%)
 rename lib/{test_scanf.c => tests/scanf_kunit.c} (76%)
 rename lib/{ => tests}/siphash_kunit.c (100%)
 rename lib/{ => tests}/slub_kunit.c (100%)
 rename lib/{ => tests}/stackinit_kunit.c (95%)
 rename lib/{ => tests}/string_helpers_kunit.c (100%)
 rename lib/{ => tests}/string_kunit.c (100%)
 rename lib/{ => tests}/test_bits.c (100%)
 rename lib/{ => tests}/test_fprobe.c (100%)
 rename lib/{ => tests}/test_hash.c (100%)
 rename lib/{ => tests}/test_kprobes.c (100%)
 rename lib/{ => tests}/test_linear_ranges.c (100%)
 rename lib/{ => tests}/test_list_sort.c (100%)
 rename lib/{ => tests}/test_sort.c (100%)
 rename lib/{ => tests}/usercopy_kunit.c (100%)
 rename lib/{ => tests}/util_macros_kunit.c (100%)
 delete mode 100755 tools/testing/selftests/lib/prime_numbers.sh
 delete mode 100755 tools/testing/selftests/lib/printf.sh
 delete mode 100755 tools/testing/selftests/lib/scanf.sh
Signature · 1 line
Kees Cook
#1 lore raw

Hi all,

Quoted 10 lines · On Mon, 17 Mar 2025 08:47:13 -0700 Kees Cook <[email protected]> wrote:

Please pull the move-lib-kunit tree for v6.15-rc1. This is a one-off tree to coordinate the move of selftests out of lib/ and into lib/tests/. A separate tree was used for this to keep the paths sane with all the work in the same place. Doing this across multiple trees was going to be very difficult, so any on-going updates were collected here to try to avoid merge conflicts. I think only one small conflict remains, just today, detailed here:
https://lore.kernel.org/linux-next/[email protected]/
sfr's resolution looks correct.

There was also

https://lore.kernel.org/linux-next/[email protected]/

Signature · 2 lines
Cheers,
Stephen Rothwell
author
#2 lore raw
Quoted 14 lines · Stephen Rothwell

Hi all,

Quoted 10 lines · On Mon, 17 Mar 2025 08:47:13 -0700 Kees Cook <[email protected]> wrote:

Please pull the move-lib-kunit tree for v6.15-rc1. This is a one-off tree to coordinate the move of selftests out of lib/ and into lib/tests/. A separate tree was used for this to keep the paths sane with all the work in the same place. Doing this across multiple trees was going to be very difficult, so any on-going updates were collected here to try to avoid merge conflicts. I think only one small conflict remains, just today, detailed here:
https://lore.kernel.org/linux-next/[email protected]/
sfr's resolution looks correct.

Quoted 3 lines

There was also

https://lore.kernel.org/linux-next/[email protected]/

Ah! Yes, thank you. :) This resolution also looks correct.

Signature · 1 line
Kees Cook
merge bot Merged
#3 lore raw
In reply to Kees Cook
The pull request you sent on Mon, 17 Mar 2025 08:47:13 -0700:

The pull request you sent on Mon, 17 Mar 2025 08:47:13 -0700:

Quoted 1 line

https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git tags/move-lib-kunit-v6.15-rc1

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/06961fbbbd7a832a5943413447d2813a714a3c82

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html