Centos-kernel-stream-9/lib/kunit
Nico Pache 9dd9b5b62a kunit: bail out early in __kunit_test_suites_init() if there are no suites to test
commit 5496b9b77d7420652202b73cf036e69760be5deb
Author: Scott Mayhew <smayhew@redhat.com>
Date:   Thu Mar 21 10:32:00 2024 -0400

    kunit: bail out early in __kunit_test_suites_init() if there are no suites to test

    Commit c72a870926c2 added a mutex to prevent kunit tests from running
    concurrently.  Unfortunately that mutex gets locked during module load
    regardless of whether the module actually has any kunit tests.  This
    causes a problem for kunit tests that might need to load other kernel
    modules (e.g. gss_krb5_test loading the camellia module).

    So check to see if there are actually any tests to run before locking
    the kunit_run_lock mutex.

    Fixes: c72a870926c2 ("kunit: add ability to run tests after boot using debugfs")
    Reported-by: Nico Pache <npache@redhat.com>
    Signed-off-by: Scott Mayhew <smayhew@redhat.com>
    Reviewed-by: Rae Moar <rmoar@google.com>
    Reviewed-by: David Gow <davidgow@google.com>
    Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>

JIRA: https://issues.redhat.com/browse/RHEL-39303
Signed-off-by: Nico Pache <npache@redhat.com>
2024-07-31 20:32:30 -06:00
..
.kunitconfig
Kconfig kunit: test: Move fault tests behind KUNIT_FAULT_TEST Kconfig option 2024-07-31 20:32:29 -06:00
Makefile kunit: Add APIs for managing devices 2024-04-17 10:46:57 +10:00
assert.c kunit: Don't use a managed alloc in is_literal() 2024-07-31 20:27:47 -06:00
attributes.c kunit: add is_init test attribute 2024-07-31 20:32:28 -06:00
debugfs.c kunit: add ability to run tests after boot using debugfs 2024-07-31 20:32:28 -06:00
debugfs.h
device-impl.h kunit: device: Unregister the kunit_bus on shutdown 2024-04-17 10:46:57 +10:00
device.c kunit: unregister the device on error 2024-07-31 20:32:29 -06:00
executor.c kunit: Mark filter* params as rw 2024-07-31 20:32:29 -06:00
executor_test.c kunit: test: Log the correct filter string in executor_test 2024-07-31 20:32:29 -06:00
hooks-impl.h kunit: Add printf attribute to fail_current_test_impl 2023-11-02 15:26:56 -06:00
hooks.c kunit: Add "hooks" to call into KUnit when it's built as a module 2023-11-02 15:26:55 -06:00
kunit-example-test.c kunit: Add example of kunit_activate_static_stub() with pointer-to-function 2024-07-31 20:32:28 -06:00
kunit-test.c kunit: test: Move fault tests behind KUNIT_FAULT_TEST Kconfig option 2024-07-31 20:32:29 -06:00
resource.c kunit: Add kunit_add_action() to defer a call until test exit 2023-11-02 15:26:57 -06:00
static_stub.c kunit: Expose 'static stub' API to redirect functions 2023-11-02 15:26:56 -06:00
string-stream-test.c kunit: string-stream-test: use KUNIT_DEFINE_ACTION_WRAPPER 2024-07-31 20:32:30 -06:00
string-stream.c kunit: string-stream: Allow ERR_PTR to be passed to string_stream_destroy() 2024-07-31 20:32:27 -06:00
string-stream.h kunit: string-stream: Decouple string_stream from kunit 2024-07-31 20:27:47 -06:00
test.c kunit: bail out early in __kunit_test_suites_init() if there are no suites to test 2024-07-31 20:32:30 -06:00
try-catch-impl.h
try-catch.c kunit: Fix race condition in try-catch completion 2024-07-31 20:32:29 -06:00