Skip to content
Commit c72a8709 authored by Rae Moar's avatar Rae Moar Committed by Shuah Khan
Browse files

kunit: add ability to run tests after boot using debugfs



Add functionality to run built-in tests after boot by writing to a
debugfs file.

Add a new debugfs file labeled "run" for each test suite to use for
this purpose.

As an example, write to the file using the following:

echo "any string" > /sys/kernel/debugfs/kunit/<testsuite>/run

This will trigger the test suite to run and will print results to the
kernel log.

To guard against running tests concurrently with this feature, add a
mutex lock around running kunit. This supports the current practice of
not allowing tests to be run concurrently on the same kernel.

This new functionality could be used to design a parameter
injection feature in the future.

Fixed up merge conflict duing rebase to Linux 6.7-rc6
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>

Reviewed-by: default avatarDavid Gow <davidgow@google.com>
Signed-off-by: default avatarRae Moar <rmoar@google.com>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent 6c4ea2f4
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment