On Thu, Jan 18, 2024 at 05:23:33PM -0500, Rae Moar wrote:
On Thu, Jan 11, 2024 at 7:13 PM Lucas De Marchi
<lucas.demarchi@xxxxxxxxx> wrote:
By allowing the filter_glob parameter to be written to, it's possible to
tweak the testsuites that will be executed on new module loads. This
makes it easier to run specific tests without having to reload kunit and
provides a way to filter tests on real HW even if kunit is builtin.
Example for xe driver:
1) Run just 1 test
# echo -n xe_bo > /sys/module/kunit/parameters/filter_glob
# modprobe -r xe_live_test
# modprobe xe_live_test
# ls /sys/kernel/debug/kunit/
xe_bo
2) Run all tests
# echo \* > /sys/module/kunit/parameters/filter_glob
# modprobe -r xe_live_test
# modprobe xe_live_test
# ls /sys/kernel/debug/kunit/
xe_bo xe_dma_buf xe_migrate xe_mocs
References: https://lore.kernel.org/intel-xe/dzacvbdditbneiu3e3fmstjmttcbne44yspumpkd6sjn56jqpk@vxu7sksbqrp6/
Signed-off-by: Lucas De Marchi <lucas.demarchi@xxxxxxxxx>
Hello!
I have tested this and this looks good to me. I agree this is very
helpful and I wonder if we should do the same with the other module
parameters (filter, filter_action).
yeah, after I sent this I was wondering about the other parameters. I
don't have a use for them right now, but I can try a few things and spin
a new version if people find it useful.
It did worry me to make filter_glob writable due to the recent patch
that requires the output of filtering to be a valid virtual address
but I think there is a sufficient amount of checking of filter_glob.
Thanks!
-Rae
Reviewed-by: Rae Moar <rmoar@xxxxxxxxxx>
thanks
Lucas De Marchi