linux/lib/kunit
Greg Kroah-Hartman e70a307b85 kunit: fix up const mis-match in many assert functions
In many kunit assert functions a const pointer is passed to
container_of() and out pops a non-const pointer, which really isn't the
correct thing to do at all.  Fix this up by correctly marking the
casted-to pointer as const to preserve the marking.

Cc: Brendan Higgins <brendan.higgins@linux.dev>
Cc: David Gow <davidgow@google.com>
Cc: Rae Moar <raemoar63@gmail.com>
Cc: linux-kselftest@vger.kernel.org
Cc: kunit-dev@googlegroups.com

Link: https://lore.kernel.org/r/2025121746-result-staleness-5a68@gregkh
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2026-01-05 15:32:03 -07:00
..
.kunitconfig
Kconfig kunit: make FAULT_TEST default to n when PANIC_ON_OOPS 2025-12-15 09:27:19 -07:00
Makefile kunit: Always descend into kunit directory during build 2025-08-15 11:39:46 -06:00
assert.c kunit: fix up const mis-match in many assert functions 2026-01-05 15:32:03 -07:00
assert_test.c kunit: Cover 'assert.c' with tests 2024-05-30 12:53:47 -06:00
attributes.c
debugfs.c kunit: Introduce autorun option 2025-01-15 09:04:06 -07:00
debugfs.h
device-impl.h
device.c kunit: Drop unused parameter from kunit_device_register_internal 2025-12-15 09:27:19 -07:00
executor.c kunit: Make filter parameters configurable via Kconfig 2025-11-14 11:02:34 -07:00
executor_test.c kunit: executor: Simplify string allocation handling 2024-07-12 10:11:48 -06:00
hooks-impl.h
hooks.c
kunit-example-test.c kunit: Add example parameterized test with direct dynamic parameter array setup 2025-08-26 23:36:03 -06:00
kunit-test.c kunit: test_dev_action: Correctly cast 'priv' pointer to long* 2025-10-20 13:08:05 -06:00
platform-test.c platform: Add test managed platform_device/driver APIs 2024-07-29 15:33:12 -07:00
platform.c platform: Add test managed platform_device/driver APIs 2024-07-29 15:33:12 -07:00
resource.c
static_stub.c kunit: Fix wrong parameter to kunit_deactivate_static_stub() 2025-05-21 09:51:23 -06:00
string-stream-test.c kunit: string-stream-test: Include <linux/prandom.h> 2024-10-03 18:20:14 +02:00
string-stream.c
string-stream.h
test.c kunit: prevent log overwrite in param_tests 2025-10-27 11:13:31 -06:00
try-catch-impl.h kunit: Adjust kunit_test timeout based on test_{suite,case} speed 2025-06-24 20:47:39 -06:00
try-catch.c kunit: Adjust kunit_test timeout based on test_{suite,case} speed 2025-06-24 20:47:39 -06:00
user_alloc.c kunit: test: Export kunit_attach_mm() 2025-07-16 14:11:58 +02:00