diff options
| author | Thadeu Lima de Souza Cascardo <cascardo@igalia.com> | 2025-06-12 14:32:20 -0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-06-24 16:46:13 +0100 |
| commit | 74d8361be3441dff0d3bd00840545288451c77a5 (patch) | |
| tree | d63a56281073da60050e19fdc0087786149e824b /lib/Kconfig.debug | |
| parent | 81bfbb2d80eec19132bc1d8d0f6d26508363d813 (diff) | |
| download | net-74d8361be3441dff0d3bd00840545288451c77a5.tar.gz | |
char: misc: add test cases
Add test cases for static and dynamic minor number allocation and
deallocation.
While at it, improve description and test suite name.
Some of the cases include:
- that static and dynamic allocation reserved the expected minors.
- that registering duplicate minors or duplicate names will fail.
- that failing to create a sysfs file (due to duplicate names) will
deallocate the dynamic minor correctly.
- that dynamic allocation does not allocate a minor number in the static
range.
- that there are no collisions when mixing dynamic and static allocations.
- that opening devices with various minor device numbers work.
- that registering a static number in the dynamic range won't conflict with
a dynamic allocation.
This last test verifies the bug fixed by commit 6d04d2b554b1 ("misc:
misc_minor_alloc to use ida for all dynamic/misc dynamic minors") has not
regressed.
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
Link: https://lore.kernel.org/r/20250612-misc-dynrange-v5-1-6f35048f7273@igalia.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/Kconfig.debug')
| -rw-r--r-- | lib/Kconfig.debug | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index ebe33181b6e6e0..03c0eef3753760 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -2506,8 +2506,8 @@ config TEST_IDA tristate "Perform selftest on IDA functions" config TEST_MISC_MINOR - tristate "miscdevice KUnit test" if !KUNIT_ALL_TESTS - depends on KUNIT + bool "miscdevice KUnit test" if !KUNIT_ALL_TESTS + depends on KUNIT=y default KUNIT_ALL_TESTS help Kunit test for miscdevice API, specially its behavior in respect to |
