|
Revision tags: v6.15, v6.15-rc7, v6.15-rc6, v6.15-rc5, v6.15-rc4, v6.15-rc3 |
|
| #
3f292517 |
| 14-Apr-2025 |
Geert Uytterhoeven <[email protected]> |
lib/prime_numbers: KUnit test should not select PRIME_NUMBERS
Enabling a (modular) test should not silently enable additional kernel functionality, as that may increase the attack vector of a produc
lib/prime_numbers: KUnit test should not select PRIME_NUMBERS
Enabling a (modular) test should not silently enable additional kernel functionality, as that may increase the attack vector of a product.
Fix this by making PRIME_NUMBERS_KUNIT_TEST depend on PRIME_NUMBERS instead of selecting it.
After this, one can safely enable CONFIG_KUNIT_ALL_TESTS=m to build modules for all appropriate tests for ones system, without pulling in extra unwanted functionality, while still allowing a tester to manually enable PRIME_NUMBERS and this test suite on a system where PRIME_NUMBERS is not enabled by default. Resurrect CONFIG_PRIME_NUMBERS=m in tools/testing/selftests/lib/config for the latter use case.
Fixes: 313b38a6ecb46db4 ("lib/prime_numbers: convert self-test to KUnit") Signed-off-by: Geert Uytterhoeven <[email protected]> Acked-by: Tamir Duberstein <[email protected]> Link: https://lore.kernel.org/r/40f8a40eef4930d3ac9febd205bc171eb04e171c.1744641237.git.geert@linux-m68k.org Signed-off-by: Kees Cook <[email protected]>
show more ...
|
|
Revision tags: v6.15-rc2, v6.15-rc1, v6.14, v6.14-rc7 |
|
| #
a7a05b1b |
| 14-Mar-2025 |
Masahiro Yamada <[email protected]> |
kbuild: deb-pkg: add comment about future removal of KDEB_COMPRESS
'man dpkg-deb' describes as follows:
DPKG_DEB_COMPRESSOR_TYPE Sets the compressor type to use (since dpkg 1.21.10).
kbuild: deb-pkg: add comment about future removal of KDEB_COMPRESS
'man dpkg-deb' describes as follows:
DPKG_DEB_COMPRESSOR_TYPE Sets the compressor type to use (since dpkg 1.21.10).
The -Z option overrides this value.
When commit 1a7f0a34ea7d ("builddeb: allow selection of .deb compressor") was applied, dpkg-deb did not support this environment variable.
Later, dpkg commit c10aeffc6d71 ("dpkg-deb: Add support for DPKG_DEB_COMPRESSOR_TYPE/LEVEL") introduced support for DPKG_DEB_COMPRESSOR_TYPE, which provides the same functionality as KDEB_COMPRESS.
KDEB_COMPRESS is still useful for users of older dpkg versions, but I would like to remove this redundant functionality in the future.
This commit adds comments to notify users of the planned removal and to encourage migration to DPKG_DEB_COMPRESSOR_TYPE where possible.
Signed-off-by: Masahiro Yamada <[email protected]>
show more ...
|
|
Revision tags: v6.14-rc6, v6.14-rc5 |
|
| #
3cf67d61 |
| 25-Feb-2025 |
Masami Hiramatsu (Google) <[email protected]> |
hung_task: show the blocker task if the task is hung on mutex
Patch series "hung_task: Dump the blocking task stacktrace", v4.
The hung_task detector is very useful for detecting the lockup. Howev
hung_task: show the blocker task if the task is hung on mutex
Patch series "hung_task: Dump the blocking task stacktrace", v4.
The hung_task detector is very useful for detecting the lockup. However, since it only dumps the blocked (uninterruptible sleep) processes, it is not enough to identify the root cause of that lockup.
For example, if a process holds a mutex and sleep an event in interruptible state long time, the other processes will wait on the mutex in uninterruptible state. In this case, the waiter processes are dumped, but the blocker process is not shown because it is sleep in interruptible state.
This adds a feature to dump the blocker task which holds a mutex when detecting a hung task. e.g.
INFO: task cat:115 blocked for more than 122 seconds. Not tainted 6.14.0-rc3-00003-ga8946be3de00 #156 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:cat state:D stack:13432 pid:115 tgid:115 ppid:106 task_flags:0x400100 flags:0x00000002 Call Trace: <TASK> __schedule+0x731/0x960 ? schedule_preempt_disabled+0x54/0xa0 schedule+0xb7/0x140 ? __mutex_lock+0x51b/0xa60 ? __mutex_lock+0x51b/0xa60 schedule_preempt_disabled+0x54/0xa0 __mutex_lock+0x51b/0xa60 read_dummy+0x23/0x70 full_proxy_read+0x6a/0xc0 vfs_read+0xc2/0x340 ? __pfx_direct_file_splice_eof+0x10/0x10 ? do_sendfile+0x1bd/0x2e0 ksys_read+0x76/0xe0 do_syscall_64+0xe3/0x1c0 ? exc_page_fault+0xa9/0x1d0 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x4840cd RSP: 002b:00007ffe99071828 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00000000004840cd RDX: 0000000000001000 RSI: 00007ffe99071870 RDI: 0000000000000003 RBP: 00007ffe99071870 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000001000000 R11: 0000000000000246 R12: 0000000000001000 R13: 00000000132fd3a0 R14: 0000000000000001 R15: ffffffffffffffff </TASK> INFO: task cat:115 is blocked on a mutex likely owned by task cat:114. task:cat state:S stack:13432 pid:114 tgid:114 ppid:106 task_flags:0x400100 flags:0x00000002 Call Trace: <TASK> __schedule+0x731/0x960 ? schedule_timeout+0xa8/0x120 schedule+0xb7/0x140 schedule_timeout+0xa8/0x120 ? __pfx_process_timeout+0x10/0x10 msleep_interruptible+0x3e/0x60 read_dummy+0x2d/0x70 full_proxy_read+0x6a/0xc0 vfs_read+0xc2/0x340 ? __pfx_direct_file_splice_eof+0x10/0x10 ? do_sendfile+0x1bd/0x2e0 ksys_read+0x76/0xe0 do_syscall_64+0xe3/0x1c0 ? exc_page_fault+0xa9/0x1d0 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x4840cd RSP: 002b:00007ffe3e0147b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00000000004840cd RDX: 0000000000001000 RSI: 00007ffe3e014800 RDI: 0000000000000003 RBP: 00007ffe3e014800 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000001000000 R11: 0000000000000246 R12: 0000000000001000 R13: 000000001a0a93a0 R14: 0000000000000001 R15: ffffffffffffffff </TASK>
TBD: We can extend this feature to cover other locks like rwsem and rt_mutex, but rwsem requires to dump all the tasks which acquire and wait that rwsem. We can follow the waiter link but the output will be a bit different compared with mutex case.
This patch (of 2):
The "hung_task" shows a long-time uninterruptible slept task, but most often, it's blocked on a mutex acquired by another task. Without dumping such a task, investigating the root cause of the hung task problem is very difficult.
This introduce task_struct::blocker_mutex to point the mutex lock which this task is waiting for. Since the mutex has "owner" information, we can find the owner task and dump it with hung tasks.
Note: the owner can be changed while dumping the owner task, so this is "likely" the owner of the mutex.
With this change, the hung task shows blocker task's info like below;
INFO: task cat:115 blocked for more than 122 seconds. Not tainted 6.14.0-rc3-00003-ga8946be3de00 #156 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:cat state:D stack:13432 pid:115 tgid:115 ppid:106 task_flags:0x400100 flags:0x00000002 Call Trace: <TASK> __schedule+0x731/0x960 ? schedule_preempt_disabled+0x54/0xa0 schedule+0xb7/0x140 ? __mutex_lock+0x51b/0xa60 ? __mutex_lock+0x51b/0xa60 schedule_preempt_disabled+0x54/0xa0 __mutex_lock+0x51b/0xa60 read_dummy+0x23/0x70 full_proxy_read+0x6a/0xc0 vfs_read+0xc2/0x340 ? __pfx_direct_file_splice_eof+0x10/0x10 ? do_sendfile+0x1bd/0x2e0 ksys_read+0x76/0xe0 do_syscall_64+0xe3/0x1c0 ? exc_page_fault+0xa9/0x1d0 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x4840cd RSP: 002b:00007ffe99071828 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00000000004840cd RDX: 0000000000001000 RSI: 00007ffe99071870 RDI: 0000000000000003 RBP: 00007ffe99071870 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000001000000 R11: 0000000000000246 R12: 0000000000001000 R13: 00000000132fd3a0 R14: 0000000000000001 R15: ffffffffffffffff </TASK> INFO: task cat:115 is blocked on a mutex likely owned by task cat:114. task:cat state:S stack:13432 pid:114 tgid:114 ppid:106 task_flags:0x400100 flags:0x00000002 Call Trace: <TASK> __schedule+0x731/0x960 ? schedule_timeout+0xa8/0x120 schedule+0xb7/0x140 schedule_timeout+0xa8/0x120 ? __pfx_process_timeout+0x10/0x10 msleep_interruptible+0x3e/0x60 read_dummy+0x2d/0x70 full_proxy_read+0x6a/0xc0 vfs_read+0xc2/0x340 ? __pfx_direct_file_splice_eof+0x10/0x10 ? do_sendfile+0x1bd/0x2e0 ksys_read+0x76/0xe0 do_syscall_64+0xe3/0x1c0 ? exc_page_fault+0xa9/0x1d0 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x4840cd RSP: 002b:00007ffe3e0147b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00000000004840cd RDX: 0000000000001000 RSI: 00007ffe3e014800 RDI: 0000000000000003 RBP: 00007ffe3e014800 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000001000000 R11: 0000000000000246 R12: 0000000000001000 R13: 000000001a0a93a0 R14: 0000000000000001 R15: ffffffffffffffff </TASK>
[[email protected]: implement debug_show_blocker() in C rather than in CPP] Link: https://lkml.kernel.org/r/174046694331.2194069.15472952050240807469.stgit@mhiramat.tok.corp.google.com Link: https://lkml.kernel.org/r/174046695384.2194069.16796289525958195643.stgit@mhiramat.tok.corp.google.com Signed-off-by: Masami Hiramatsu (Google) <[email protected]> Reviewed-by: Waiman Long <[email protected]> Reviewed-by: Lance Yang <[email protected]> Reviewed-by: Sergey Senozhatsky <[email protected]> Cc: Anna Schumaker <[email protected]> Cc: Boqun Feng <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Joel Granados <[email protected]> Cc: Kent Overstreet <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Tomasz Figa <[email protected]> Cc: Will Deacon <[email protected]> Cc: Yongliang Gao <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
show more ...
|
| #
b5217306 |
| 17-Mar-2025 |
Ingo Molnar <[email protected]> |
sched/debug: Remove CONFIG_SCHED_DEBUG
For more than a decade, CONFIG_SCHED_DEBUG=y has been enabled in all the major Linux distributions:
/boot/config-6.11.0-19-generic:CONFIG_SCHED_DEBUG=y
Th
sched/debug: Remove CONFIG_SCHED_DEBUG
For more than a decade, CONFIG_SCHED_DEBUG=y has been enabled in all the major Linux distributions:
/boot/config-6.11.0-19-generic:CONFIG_SCHED_DEBUG=y
The reason is that while originally CONFIG_SCHED_DEBUG started out as a debugging feature, over the years (decades ...) it has grown various bits of statistics, instrumentation and control knobs that are useful for sysadmin and general software development purposes as well.
But within the kernel we still pretend that there's a choice, and sometimes code that is seemingly 'debug only' creates overhead that should be optimized in reality.
So make it all official and make CONFIG_SCHED_DEBUG unconditional.
Now that all uses of CONFIG_SCHED_DEBUG are removed from the code by previous patches, remove the Kconfig option as well.
Signed-off-by: Ingo Molnar <[email protected]> Tested-by: Shrikanth Hegde <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Juri Lelli <[email protected]> Cc: Vincent Guittot <[email protected]> Cc: Dietmar Eggemann <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Ben Segall <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Valentin Schneider <[email protected]> Cc: Linus Torvalds <[email protected]> Link: https://lore.kernel.org/r/[email protected]
show more ...
|
| #
36799069 |
| 14-Mar-2025 |
Josh Poimboeuf <[email protected]> |
objtool: Add CONFIG_OBJTOOL_WERROR
Objtool warnings can be indicative of crashes, broken live patching, or even boot failures. Ignoring them is not recommended.
Add CONFIG_OBJTOOL_WERROR to upgrad
objtool: Add CONFIG_OBJTOOL_WERROR
Objtool warnings can be indicative of crashes, broken live patching, or even boot failures. Ignoring them is not recommended.
Add CONFIG_OBJTOOL_WERROR to upgrade objtool warnings to errors by enabling the objtool --Werror option. Also set --backtrace to print the branches leading up to the warning, which can help considerably when debugging certain warnings.
To avoid breaking bots too badly for now, make it the default for real world builds only (!COMPILE_TEST).
Co-developed-by: Brendan Jackman <[email protected]> Signed-off-by: Josh Poimboeuf <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Link: https://lore.kernel.org/r/3e7c109313ff15da6c80788965cc7450115b0196.1741975349.git.jpoimboe@kernel.org
show more ...
|
| #
c104c160 |
| 02-Mar-2025 |
Sergio González Collado <[email protected]> |
Kunit to check the longest symbol length
The longest length of a symbol (KSYM_NAME_LEN) was increased to 512 in the reference [1]. This patch adds kunit test suite to check the longest symbol length
Kunit to check the longest symbol length
The longest length of a symbol (KSYM_NAME_LEN) was increased to 512 in the reference [1]. This patch adds kunit test suite to check the longest symbol length. These tests verify that the longest symbol length defined is supported.
This test can also help other efforts for longer symbol length, like [2].
The test suite defines one symbol with the longest possible length.
The first test verify that functions with names of the created symbol, can be called or not.
The second test, verify that the symbols are created (or not) in the kernel symbol table.
[1] https://lore.kernel.org/lkml/[email protected]/ [2] https://lore.kernel.org/lkml/[email protected]/
Link: https://lore.kernel.org/r/[email protected] Tested-by: Martin Rodriguez Reboredo <[email protected]> Reviewed-by: Shuah Khan <[email protected]> Reviewed-by: Rae Moar <[email protected]> Signed-off-by: Sergio González Collado <[email protected]> Link: https://github.com/Rust-for-Linux/linux/issues/504 Reviewed-by: Rae Moar <[email protected]> Acked-by: David Gow <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
|
Revision tags: v6.14-rc4 |
|
| #
268d191a |
| 17-Feb-2025 |
Thomas Weißschuh <[email protected]> |
kbuild: implement CONFIG_HEADERS_INSTALL for Usermode Linux
userprogs sometimes need access to UAPI headers. This is currently not possible for Usermode Linux, as UM is only a pseudo architecture bu
kbuild: implement CONFIG_HEADERS_INSTALL for Usermode Linux
userprogs sometimes need access to UAPI headers. This is currently not possible for Usermode Linux, as UM is only a pseudo architecture built on top of a regular architecture and does not have its own UAPI. Instead use the UAPI headers from the underlying regular architecture.
Signed-off-by: Thomas Weißschuh <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
show more ...
|
| #
97c1f302 |
| 07-Mar-2025 |
Tamir Duberstein <[email protected]> |
scanf: convert self-test to KUnit
Convert the scanf() self-test to a KUnit test.
In the interest of keeping the patch reasonably-sized this doesn't refactor the tests into proper parameterized test
scanf: convert self-test to KUnit
Convert the scanf() self-test to a KUnit test.
In the interest of keeping the patch reasonably-sized this doesn't refactor the tests into proper parameterized tests - it's all one big test case.
Reviewed-by: David Gow <[email protected]> Reviewed-by: Petr Mladek <[email protected]> Tested-by: Petr Mladek <[email protected]> Signed-off-by: Tamir Duberstein <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Kees Cook <[email protected]>
show more ...
|
| #
7a79e7da |
| 07-Mar-2025 |
Tamir Duberstein <[email protected]> |
printf: convert self-test to KUnit
Convert the printf() self-test to a KUnit test.
In the interest of keeping the patch reasonably-sized this doesn't refactor the tests into proper parameterized te
printf: convert self-test to KUnit
Convert the printf() self-test to a KUnit test.
In the interest of keeping the patch reasonably-sized this doesn't refactor the tests into proper parameterized tests - it's all one big test case.
Signed-off-by: Tamir Duberstein <[email protected]> Reviewed-by: Petr Mladek <[email protected]> Tested-by: Petr Mladek <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Kees Cook <[email protected]>
show more ...
|
| #
7715f8cf |
| 04-Mar-2025 |
Eric Biggers <[email protected]> |
lib/crc_kunit.c: add test and benchmark for crc7_be()
Wire up crc7_be() to crc_kunit. Previously it had no test.
Link: https://lore.kernel.org/r/[email protected] Signed-
lib/crc_kunit.c: add test and benchmark for crc7_be()
Wire up crc7_be() to crc_kunit. Previously it had no test.
Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Eric Biggers <[email protected]>
show more ...
|
|
Revision tags: v6.14-rc3 |
|
| #
04ec365e |
| 15-Feb-2025 |
Ujwal Kundur <[email protected]> |
Documentation: fix doc link to fault-injection.rst
Fix incorrect reference to fault-injection docs
Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Ujwal K
Documentation: fix doc link to fault-injection.rst
Fix incorrect reference to fault-injection docs
Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Ujwal Kundur <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
show more ...
|
|
Revision tags: v6.14-rc2 |
|
| #
8b17e540 |
| 09-Feb-2025 |
Mateusz Guzik <[email protected]> |
vfs: add initial support for CONFIG_DEBUG_VFS
Small collection of macros taken from mmdebug.h
Signed-off-by: Mateusz Guzik <[email protected]> Link: https://lore.kernel.org/r/20250209185523.745956-
vfs: add initial support for CONFIG_DEBUG_VFS
Small collection of macros taken from mmdebug.h
Signed-off-by: Mateusz Guzik <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Jan Kara <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
show more ...
|
|
Revision tags: v6.14-rc1 |
|
| #
6aa98263 |
| 23-Jan-2025 |
Thadeu Lima de Souza Cascardo <[email protected]> |
char: misc: improve testing Kconfig description
Describe that it tests the miscdevice API and include the usual disclaimer about KUnit not being fit for production kernels.
While at it, also fix KU
char: misc: improve testing Kconfig description
Describe that it tests the miscdevice API and include the usual disclaimer about KUnit not being fit for production kernels.
While at it, also fix KUnit capitalization.
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
| #
313b38a6 |
| 09-Feb-2025 |
Tamir Duberstein <[email protected]> |
lib/prime_numbers: convert self-test to KUnit
Extract a private header and convert the prime_numbers self-test to a KUnit test. I considered parameterizing the test using `KUNIT_CASE_PARAM` but didn
lib/prime_numbers: convert self-test to KUnit
Extract a private header and convert the prime_numbers self-test to a KUnit test. I considered parameterizing the test using `KUNIT_CASE_PARAM` but didn't see how it was possible since the test logic is entangled with the test parameter generation logic.
Signed-off-by: Tamir Duberstein <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Kees Cook <[email protected]>
show more ...
|
| #
9ab61886 |
| 03-Feb-2025 |
Yu-Chun Lin <[email protected]> |
lib/math: Add Kunit test suite for gcd()
Add a KUnit test suite for the gcd() function. This test suite verifies the correctness of gcd() across various scenarios, including edge cases.
Signed-off-
lib/math: Add Kunit test suite for gcd()
Add a KUnit test suite for the gcd() function. This test suite verifies the correctness of gcd() across various scenarios, including edge cases.
Signed-off-by: Yu-Chun Lin <[email protected]> Reviewed-by: Kuan-Wei Chiu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Kees Cook <[email protected]>
show more ...
|
| #
b341f6fd |
| 08-Feb-2025 |
Tamir Duberstein <[email protected]> |
blackhole_dev: convert self-test to KUnit
Convert this very simple smoke test to a KUnit test.
Add a missing `htons` call that was spotted[0] by kernel test robot <[email protected]> after initial conv
blackhole_dev: convert self-test to KUnit
Convert this very simple smoke test to a KUnit test.
Add a missing `htons` call that was spotted[0] by kernel test robot <[email protected]> after initial conversion to KUnit.
Link: https://lore.kernel.org/oe-kbuild-all/[email protected]/ [0] Signed-off-by: Tamir Duberstein <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
|
Revision tags: v6.13, v6.13-rc7, v6.13-rc6, v6.13-rc5, v6.13-rc4, v6.13-rc3, v6.13-rc2 |
|
| #
4d557cb4 |
| 02-Dec-2024 |
Diego Vieira <[email protected]> |
lib/tests/kfifo_kunit.c: add tests for the kfifo structure
Add KUnit tests for the kfifo data structure. They test the vast majority of macros defined in the kfifo header (include/linux/kfifo.h).
T
lib/tests/kfifo_kunit.c: add tests for the kfifo structure
Add KUnit tests for the kfifo data structure. They test the vast majority of macros defined in the kfifo header (include/linux/kfifo.h).
These are inspired by the existing tests for the doubly linked list in lib/tests/list-test.c (previously at lib/list-test.c) [1].
Note that this patch depends on the patch that moves the KUnit tests on lib/ into lib/tests/ [2].
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/lib/list-test.c?h=v6.11-rc6 [2] https://lore.kernel.org/all/[email protected]/
Signed-off-by: Diego Vieira <[email protected]> Reviewed-by: David Gow <[email protected]> Reviewed-by: Rae Moar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Kees Cook <[email protected]>
show more ...
|
| #
84ec093f |
| 02-Dec-2024 |
Bruno Sobreira França <[email protected]> |
lib/math: Add int_log test suite
This commit introduces KUnit tests for the intlog2 and intlog10 functions, which compute logarithms in base 2 and base 10, respectively. The tests cover a range of i
lib/math: Add int_log test suite
This commit introduces KUnit tests for the intlog2 and intlog10 functions, which compute logarithms in base 2 and base 10, respectively. The tests cover a range of inputs to ensure the correctness of these functions across common and edge cases.
Signed-off-by: Bruno Sobreira França <[email protected]> Reviewed-by: David Gow <[email protected]> Reviewed-by: Rae Moar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Kees Cook <[email protected]>
show more ...
|
| #
3e50ba8f |
| 02-Dec-2024 |
Luis Felipe Hernandez <[email protected]> |
lib: math: Move KUnit tests into tests/ subdir
This patch is a follow-up task from a discussion stemming from point 3 in a recent patch introducing the int_pow kunit test [1] and documentation regar
lib: math: Move KUnit tests into tests/ subdir
This patch is a follow-up task from a discussion stemming from point 3 in a recent patch introducing the int_pow kunit test [1] and documentation regarding kunit test style and nomenclature [2].
Colocate all kunit test suites in lib/math/tests/ and follow recommended naming convention for files <suite>_kunit.c and kconfig entries CONFIG_<name>_KUNIT_TEST.
Link: https://lore.kernel.org/all/CABVgOS=-vh5TqHFCq_jo=ffq8v_nGgr6JsPnOZag3e6+19ysxQ@mail.gmail.com/ [1] Link: https://docs.kernel.org/dev-tools/kunit/style.html [2]
Signed-off-by: Luis Felipe Hernandez <[email protected]> Acked-by: Nicolas Pitre <[email protected]> Reviewed-by: David Gow <[email protected]> Reviewed-by: Rae Moar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Kees Cook <[email protected]>
show more ...
|
| #
05033905 |
| 31-Jan-2025 |
Andrew Morton <[email protected]> |
revert "xarray: port tests to kunit"
Revert c7bb5cf9fc4e ("xarray: port tests to kunit"). It broke the build when compiing the xarray userspace test harness code.
Reported-by: Sidhartha Kumar <sid
revert "xarray: port tests to kunit"
Revert c7bb5cf9fc4e ("xarray: port tests to kunit"). It broke the build when compiing the xarray userspace test harness code.
Reported-by: Sidhartha Kumar <[email protected]> Closes: https://lkml.kernel.org/r/[email protected] Cc: David Gow <[email protected]> Cc: Matthew Wilcox <[email protected]> Cc: Tamir Duberstein <[email protected]> Cc: "Liam R. Howlett" <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Lorenzo Stoakes <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
show more ...
|
| #
0fafc9e1 |
| 13-Dec-2024 |
Luis Felipe Hernandez <[email protected]> |
lib/math: add int_sqrt test suite
Adds test suite for integer based square root function.
The test suite is designed to verify the correctness of the int_sqrt() math library function.
Link: https:
lib/math: add int_sqrt test suite
Adds test suite for integer based square root function.
The test suite is designed to verify the correctness of the int_sqrt() math library function.
Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Luis Felipe Hernandez <[email protected]> Reviewed-by: Kuan-Wei Chiu <[email protected]> Cc: David Gow <[email protected]> Cc: Ricardo B. Marliere <[email protected]> Cc: Shuah Khan <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
show more ...
|
| #
c7bb5cf9 |
| 05-Dec-2024 |
Tamir Duberstein <[email protected]> |
xarray: port tests to kunit
Minimally rewrite the XArray unit tests to use kunit. This integrates nicely with existing kunit tools which produce nicer human-readable output compared to the existing
xarray: port tests to kunit
Minimally rewrite the XArray unit tests to use kunit. This integrates nicely with existing kunit tools which produce nicer human-readable output compared to the existing machinery.
Running the xarray tests before this change requires an obscure invocation
``` tools/testing/kunit/kunit.py run --arch arm64 --make_options LLVM=1 \ --kconfig_add CONFIG_TEST_XARRAY=y --raw_output=all nothing ```
which on failure produces
``` BUG at check_reserve:513 ... XArray: 6782340 of 6782364 tests passed ```
and exits 0.
Running the xarray tests after this change requires a simpler invocation
``` tools/testing/kunit/kunit.py run --arch arm64 --make_options LLVM=1 \ xarray ```
which on failure produces (colors omitted)
``` [09:50:53] ====================== check_reserve ====================== [09:50:53] [FAILED] param-0 [09:50:53] # check_reserve: EXPECTATION FAILED at lib/test_xarray.c:536 [09:50:53] xa_erase(xa, 12345678) != NULL ... [09:50:53] # module: test_xarray [09:50:53] # xarray: pass:26 fail:3 skip:0 total:29 [09:50:53] # Totals: pass:28 fail:3 skip:0 total:31 [09:50:53] ===================== [FAILED] xarray ====================== ```
and exits 1.
Use of richer kunit assertions is intentionally omitted to reduce the scope of the change.
[[email protected]: fix cocci warning] Link: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Tamir Duberstein <[email protected]> Cc: Bill Wendling <[email protected]> Cc: Christophe Leroy <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Justin Stitt <[email protected]> Cc: Madhavan Srinivasan <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Nathan Chancellor <[email protected]> Cc: Naveen N Rao <[email protected]> Cc: Nicholas Piggin <[email protected]> Cc: Nick Desaulniers <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
show more ...
|
|
Revision tags: v6.13-rc1 |
|
| #
93aa1b5c |
| 29-Nov-2024 |
Kuan-Wei Chiu <[email protected]> |
lib/test_min_heap: use inline min heap variants to reduce attack vector
To address concerns about increasing the attack vector, remove the select MIN_HEAP dependency from TEST_MIN_HEAP in Kconfig.de
lib/test_min_heap: use inline min heap variants to reduce attack vector
To address concerns about increasing the attack vector, remove the select MIN_HEAP dependency from TEST_MIN_HEAP in Kconfig.debug.
Additionally, all min heap test function calls in lib/test_min_heap.c are replaced with their inline variants. By exclusively using inline variants, we eliminate the need to enable CONFIG_MIN_HEAP for testing purposes.
Link: https://lore.kernel.org/lkml/CAMuHMdVO5DPuD9HYWBFqKDHphx7+0BEhreUxtVC40A=8p6VAhQ@mail.gmail.com Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Kuan-Wei Chiu <[email protected]> Suggested-by: Geert Uytterhoeven <[email protected]> Cc: Ching-Chun (Jim) Huang <[email protected]> Cc: Jonathan Corbet <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
show more ...
|
|
Revision tags: v6.12, v6.12-rc7, v6.12-rc6, v6.12-rc5 |
|
| #
37df9043 |
| 21-Oct-2024 |
Vimal Agrawal <[email protected]> |
misc:minor basic kunit tests
basic kunit tests for misc minor
Signed-off-by: Vimal Agrawal <[email protected]> Reviewed-by: Dirk VanDerMerwe <[email protected]> Link: https://lore.
misc:minor basic kunit tests
basic kunit tests for misc minor
Signed-off-by: Vimal Agrawal <[email protected]> Reviewed-by: Dirk VanDerMerwe <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
| #
d5af79c0 |
| 10-Dec-2024 |
Randy Dunlap <[email protected]> |
Documentation: move dev-tools debugging files to process/debugging/
Move gdb and kgdb debugging documentation to the dedicated debugging directory (Documentation/process/debugging/). Adjust the inde
Documentation: move dev-tools debugging files to process/debugging/
Move gdb and kgdb debugging documentation to the dedicated debugging directory (Documentation/process/debugging/). Adjust the index.rst files to follow the file movement. Adjust files that refer to these moved files to follow the file movement. Update location of kgdb.rst in MAINTAINERS file. Add a link from dev-tools/index to process/debugging/index.
Note: translations are not updated.
Signed-off-by: Randy Dunlap <[email protected]> Cc: Sebastian Fricke <[email protected]> Cc: Jonathan Corbet <[email protected]> Cc: [email protected] Cc: Jason Wessel <[email protected]> Cc: Daniel Thompson <[email protected]> Cc: Douglas Anderson <[email protected]> Cc: [email protected] Cc: [email protected] Cc: Doug Anderson <[email protected]> Cc: Alex Shi <[email protected]> Cc: Hu Haowen <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: [email protected] Acked-by: Greg Kroah-Hartman <[email protected]> Acked-by: Daniel Thompson <[email protected]> Reviewed-by: Douglas Anderson <[email protected]> Signed-off-by: Jonathan Corbet <[email protected]> Link: https://lore.kernel.org/r/[email protected]
show more ...
|