Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'linux_kselftest-kunit-6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest

Pull kunit updates from Shuah Khan:

- Make filter parameters configurable via Kconfig

- Add description of kunit.enable parameter to documentation

* tag 'linux_kselftest-kunit-6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
kunit: Make filter parameters configurable via Kconfig
Documentation: kunit: add description of kunit.enable parameter

+35 -3
+6
Documentation/dev-tools/kunit/run_manual.rst
··· 35 35 a good way of quickly testing everything applicable to the current 36 36 config. 37 37 38 + KUnit can be enabled or disabled at boot time, and this behavior is 39 + controlled by the kunit.enable kernel parameter. 40 + By default, kunit.enable is set to 1 because KUNIT_DEFAULT_ENABLED is 41 + enabled by default. To ensure that tests are executed as expected, 42 + verify that kunit.enable=1 at boot time. 43 + 38 44 Once we have built our kernel (and/or modules), it is simple to run 39 45 the tests. If the tests are built-in, they will run automatically on the 40 46 kernel boot. The results will be written to the kernel log (``dmesg``)
+24
lib/kunit/Kconfig
··· 93 93 In most cases this should be left as Y. Only if additional opt-in 94 94 behavior is needed should this be set to N. 95 95 96 + config KUNIT_DEFAULT_FILTER_GLOB 97 + string "Default value of the filter_glob module parameter" 98 + help 99 + Sets the default value of kunit.filter_glob. If set to a non-empty 100 + string only matching tests are executed. 101 + 102 + If unsure, leave empty so all tests are executed. 103 + 104 + config KUNIT_DEFAULT_FILTER 105 + string "Default value of the filter module parameter" 106 + help 107 + Sets the default value of kunit.filter. If set to a non-empty 108 + string only matching tests are executed. 109 + 110 + If unsure, leave empty so all tests are executed. 111 + 112 + config KUNIT_DEFAULT_FILTER_ACTION 113 + string "Default value of the filter_action module parameter" 114 + help 115 + Sets the default value of kunit.filter_action. If set to a non-empty 116 + string only matching tests are executed. 117 + 118 + If unsure, leave empty so all tests are executed. 119 + 96 120 config KUNIT_DEFAULT_TIMEOUT 97 121 int "Default value of the timeout module parameter" 98 122 default 300
+5 -3
lib/kunit/executor.c
··· 45 45 return autorun_param; 46 46 } 47 47 48 - static char *filter_glob_param; 49 - static char *filter_param; 50 - static char *filter_action_param; 48 + #define PARAM_FROM_CONFIG(config) (config[0] ? config : NULL) 49 + 50 + static char *filter_glob_param = PARAM_FROM_CONFIG(CONFIG_KUNIT_DEFAULT_FILTER_GLOB); 51 + static char *filter_param = PARAM_FROM_CONFIG(CONFIG_KUNIT_DEFAULT_FILTER); 52 + static char *filter_action_param = PARAM_FROM_CONFIG(CONFIG_KUNIT_DEFAULT_FILTER_ACTION); 51 53 52 54 module_param_named(filter_glob, filter_glob_param, charp, 0600); 53 55 MODULE_PARM_DESC(filter_glob,