| a5e71638 | 25-Jul-2025 |
Steven Rostedt <rostedt@goodmis.org> |
ktest.pl: Add new PATCHCHECK_SKIP option to skip testing individual commits
When testing a series of commits that also includes changes to the Linux tools directory, it is useless to test the change
ktest.pl: Add new PATCHCHECK_SKIP option to skip testing individual commits
When testing a series of commits that also includes changes to the Linux tools directory, it is useless to test the changes in tools as they may not affect the kernel itself. Doing tests on the kernel for changes that do not affect the kernel is a waste of time.
Add a PATCHCHECK_SKIP that takes a series of shas that will be skipped while doing the individual commit tests.
For example, the runtime verification may have a series of commits like:
$ git log --abbrev-commit --pretty=oneline fac5493251a6~1..HEAD 3d3800b4f7f4 rv: Remove rv_reactor's reference counter 3d3c376118b5 rv: Merge struct rv_reactor_def into struct rv_reactor 24cbfe18d55a rv: Merge struct rv_monitor_def into struct rv_monitor b0c08dd5348d rv: Remove unused field in struct rv_monitor_def 58d5f0d437a8 (debiantesting-x86-64/trace/rv/core) rv: Return init error when registering monitors 560473f2e2d7 verification/rvgen: Organise Kconfig entries for nested monitors 9efcf590827c tools/dot2c: Fix generated files going over 100 column limit 1160ccaf772f tools/rv: Stop gracefully also on SIGTERM f60227f34489 tools/rv: Do not skip idle in trace f3735df6281e verification/rvgen: Do not generate unused variables 6fb37c2a27eb verification/rvgen: Generate each variable definition only once 8cfcf9b0e92f verification/rvgen: Support the 'next' operator fac5493251a6 rv: Allow to configure the number of per-task monitor
Where the first commit touches the kernel followed by a series of commits that do not, and ends with commits that do. Instead of having to add multiple patchcheck tests to handle the gaps, just include the commits that should not be tested:
$ git log --abbrev-commit --pretty=oneline fac5493251a6~1..HEAD | grep -e verification -e tools/ | cut -d' ' -f1 | while read a ; do echo -n "$a "; done 560473f2e2d7 9efcf590827c 1160ccaf772f f60227f34489 f3735df6281e 6fb37c2a27eb 8cfcf9b0e92f
Then set PATCHCHECK_SKIP to that, and those commits will be skipped.
PATCHCHECK_SKIP = 560473f2e2d7 9efcf590827c 1160ccaf772f f60227f34489 f3735df6281e 6fb37c2a27eb 8cfcf9b0e92f
Cc: John 'Warthog9' Hawley <warthog9@kernel.org> Cc: Dhaval Giani <dhaval.giani@gmail.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/20250725112153.1dd06b84@gandalf.local.home Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
show more ...
|
| 23a2d4c6 | 18-Jul-2025 |
Steven Rostedt <rostedt@goodmis.org> |
ktest.pl: Always display BUILD_DIR and OUTPUT_DIR at the start of tests
As ktest.pl can run in various different directories, to make sure the test is running in the proper directory with the proper
ktest.pl: Always display BUILD_DIR and OUTPUT_DIR at the start of tests
As ktest.pl can run in various different directories, to make sure the test is running in the proper directory with the proper source and proper destination directory, display the content of BUILD_DIR and OUTPUT_DIR at the start of every test.
This can be helpful for the test runner to stop the test if a test is running in the wrong location instead of finding out after the test has completed.
Cc: "John Warthog9 Hawley" <warthog9@kernel.org> Cc: Dhaval Giani <dhaval.giani@gmail.com> Cc: Greg KH <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/20250718202053.898022631@kernel.org Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
show more ...
|
| 61f7e318 | 18-Jul-2025 |
Steven Rostedt <rostedt@goodmis.org> |
ktest.pl: Prevent recursion of default variable options
If a default variable contains itself, do not recurse on it.
For example:
ADD_CONFIG := ${CONFIG_DIR}/temp_config DEFAULTS ADD_CONFIG
ktest.pl: Prevent recursion of default variable options
If a default variable contains itself, do not recurse on it.
For example:
ADD_CONFIG := ${CONFIG_DIR}/temp_config DEFAULTS ADD_CONFIG = ${CONFIG_DIR}/default_config ${ADD_CONFIG}
The above works because the temp variable ADD_CONFIG (is a temp because it is created with ":=") is already defined, it will be substituted in the variable option. But if it gets commented out:
# ADD_CONFIG := ${CONFIG_DIR}/temp_config DEFAULTS ADD_CONFIG = ${CONFIG_DIR}/default_config ${ADD_CONFIG}
Then the above will go into a recursive loop where ${ADD_CONFIG} will get replaced with the current definition of ADD_CONFIG which contains the ${ADD_CONFIG} and that will also try to get converted. ktest.pl will error after 100 attempts of recursion and fail.
When replacing a variable with the default variable, if the default variable contains itself, do not replace it.
Cc: "John Warthog9 Hawley" <warthog9@kernel.org> Cc: Dhaval Giani <dhaval.giani@gmail.com> Cc: Greg KH <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/20250718202053.732189428@kernel.org Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
show more ...
|
| acd98e23 | 18-Jul-2025 |
Steven Rostedt <rostedt@goodmis.org> |
ktest.pl: Have -D option work without a space
Allow -DBUILD_TYPE=boot work the same as -D BUILD_TYPE=boot just like normal single character option does in most applications.
Cc: "John Warthog9 Hawl
ktest.pl: Have -D option work without a space
Allow -DBUILD_TYPE=boot work the same as -D BUILD_TYPE=boot just like normal single character option does in most applications.
Cc: "John Warthog9 Hawley" <warthog9@kernel.org> Cc: Dhaval Giani <dhaval.giani@gmail.com> Cc: Greg KH <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/20250718202053.567246162@kernel.org Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
show more ...
|
| 3bcdb6e9 | 18-Jul-2025 |
Steven Rostedt <rostedt@goodmis.org> |
ktest.pl: Allow command option -D to override temp variables
Currently -D only updates the persistent options that are defined with "=". Allow it to also override all temp variables that are defined
ktest.pl: Allow command option -D to override temp variables
Currently -D only updates the persistent options that are defined with "=". Allow it to also override all temp variables that are defined with ":=".
ktest.pl -D 'USE_TEMP_DIR:=1' -D 'TEST_TYPE[2]=build' config
Cc: "John Warthog9 Hawley" <warthog9@kernel.org> Cc: Dhaval Giani <dhaval.giani@gmail.com> Cc: Greg KH <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/20250718202053.399653933@kernel.org Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
show more ...
|
| f3a30016 | 18-Dec-2024 |
WangYuli <wangyuli@uniontech.com> |
ktest.pl: Fix typo "accesing"
There is a spelling mistake of 'accesing' in comments which should be 'accessing'.
Fixes: 6d76f469c8ac9 ("ktest: Add useful example configs") Link: https://lore.kernel
ktest.pl: Fix typo "accesing"
There is a spelling mistake of 'accesing' in comments which should be 'accessing'.
Fixes: 6d76f469c8ac9 ("ktest: Add useful example configs") Link: https://lore.kernel.org/8714AE3735C0EA0B+20241218140437.194906-1-wangyuli@uniontech.com Reviewed-by: SeongJae Park <sj@kernel.org> Signed-off-by: WangYuli <wangyuli@uniontech.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
show more ...
|
| 770221a3 | 02-Sep-2024 |
Ba Jing <bajing@cmss.chinamobile.com> |
ktest.pl: Fix typo in comment
"on of these" should be "one of these".
Fixes: 77d942ceacbad ("ktest: Create variables for the ktest config files") Link: https://lore.kernel.org/20240902124645.5674-1
ktest.pl: Fix typo in comment
"on of these" should be "one of these".
Fixes: 77d942ceacbad ("ktest: Create variables for the ktest config files") Link: https://lore.kernel.org/20240902124645.5674-1-bajing@cmss.chinamobile.com Signed-off-by: Ba Jing <bajing@cmss.chinamobile.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
show more ...
|
| 776735b9 | 02-Sep-2024 |
Ba Jing <bajing@cmss.chinamobile.com> |
ktest.pl: Remove unused declarations in run_bisect_test function
Since $output and $ret are not used in the subsequent code, the declarations should be removed.
Fixes: a75fececff3c ("ktest: Added s
ktest.pl: Remove unused declarations in run_bisect_test function
Since $output and $ret are not used in the subsequent code, the declarations should be removed.
Fixes: a75fececff3c ("ktest: Added sample.conf, new %default option format") Link: https://lore.kernel.org/20240902130735.6034-1-bajing@cmss.chinamobile.com Signed-off-by: Ba Jing <bajing@cmss.chinamobile.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
show more ...
|
| 2351e8c6 | 04-Sep-2024 |
Daniel Jordan <daniel.m.jordan@oracle.com> |
ktest.pl: Avoid false positives with grub2 skip regex
Some distros have grub2 config files with the lines
if [ x"${feature_menuentry_id}" = xy ]; then menuentry_id_option="--id" else
ktest.pl: Avoid false positives with grub2 skip regex
Some distros have grub2 config files with the lines
if [ x"${feature_menuentry_id}" = xy ]; then menuentry_id_option="--id" else menuentry_id_option="" fi
which match the skip regex defined for grub2 in get_grub_index():
$skip = '^\s*menuentry';
These false positives cause the grub number to be higher than it should be, and the wrong kernel can end up booting.
Grub documents the menuentry command with whitespace between it and the title, so make the skip regex reflect this.
Link: https://lore.kernel.org/20240904175530.84175-1-daniel.m.jordan@oracle.com Signed-off-by: Daniel Jordan <daniel.m.jordan@oracle.com> Acked-by: John 'Warthog9' Hawley (Tenstorrent) <warthog9@eaglescrag.net> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
show more ...
|
| 07283c18 | 15-Mar-2024 |
Ricardo B. Marliere <ricardo@marliere.net> |
ktest: force $buildonly = 1 for 'make_warnings_file' test type
The test type "make_warnings_file" should have no mandatory configuration parameters other than the ones required by the "build" test t
ktest: force $buildonly = 1 for 'make_warnings_file' test type
The test type "make_warnings_file" should have no mandatory configuration parameters other than the ones required by the "build" test type, because its purpose is to create a file with build warnings that may or may not be used by other subsequent tests. Currently, the only way to use it as a stand-alone test is by setting POWER_CYCLE, CONSOLE, SSH_USER, BUILD_TARGET, TARGET_IMAGE, REBOOT_TYPE and GRUB_MENU.
Link: https://lkml.kernel.org/r/20240315-ktest-v2-1-c5c20a75f6a3@marliere.net
Cc: John Hawley <warthog9@eaglescrag.net> Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
show more ...
|
| 7dc8e24f | 20-Jan-2023 |
Masami Hiramatsu (Google) <mhiramat@kernel.org> |
ktest: Restore stty setting at first in dodie
The do_send_email() will call die before restoring stty if sendmail setting is not correct or sendmail is not installed. It is safer to restore it in th
ktest: Restore stty setting at first in dodie
The do_send_email() will call die before restoring stty if sendmail setting is not correct or sendmail is not installed. It is safer to restore it in the beginning of dodie().
Link: https://lkml.kernel.org/r/167420617635.2988775.13045295332829029437.stgit@devnote3
Cc: John 'Warthog9' Hawley <warthog9@kernel.org> Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
show more ...
|
| 4e7d2a8f | 18-Jan-2023 |
Steven Rostedt <rostedt@goodmis.org> |
ktest.pl: Add RUN_TIMEOUT option with default unlimited
There is a disconnect between the run_command function and the wait_for_input. The wait_for_input has a default timeout of 2 minutes. But if t
ktest.pl: Add RUN_TIMEOUT option with default unlimited
There is a disconnect between the run_command function and the wait_for_input. The wait_for_input has a default timeout of 2 minutes. But if that happens, the run_command loop will exit out to the waitpid() of the executing command. This fails in that it no longer monitors the command, and also, the ssh to the test box can hang when its finished, as it's waiting for the pipe it's writing to to flush, but the loop that reads that pipe has already exited, leaving the command stuck, and the test hangs.
Instead, make the default "wait_for_input" of the run_command infinite, and allow the user to override it if they want with a default timeout option "RUN_TIMEOUT".
But this fixes the hang that happens when the pipe is full and the ssh session never exits.
Cc: stable@vger.kernel.org Fixes: 6e98d1b4415fe ("ktest: Add timeout to ssh command") Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
show more ...
|
| 83d29d43 | 18-Jan-2023 |
Steven Rostedt <rostedt@goodmis.org> |
ktest.pl: Give back console on Ctrt^C on monitor
When monitoring the console output, the stdout is being redirected to do so. If Ctrl^C is hit during this mode, the stdout is not back to the console
ktest.pl: Give back console on Ctrt^C on monitor
When monitoring the console output, the stdout is being redirected to do so. If Ctrl^C is hit during this mode, the stdout is not back to the console, the user does not see anything they type (no echo).
Add "end_monitor" to the SIGINT interrupt handler to give back the console on Ctrl^C.
Cc: stable@vger.kernel.org Fixes: 9f2cdcbbb90e7 ("ktest: Give console process a dedicated tty") Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
show more ...
|
| e8bf9b98 | 18-Jan-2023 |
Steven Rostedt <rostedt@goodmis.org> |
ktest.pl: Fix missing "end_monitor" when machine check fails
In the "reboot" command, it does a check of the machine to see if it is still alive with a simple "ssh echo" command. If it fails, it wil
ktest.pl: Fix missing "end_monitor" when machine check fails
In the "reboot" command, it does a check of the machine to see if it is still alive with a simple "ssh echo" command. If it fails, it will assume that a normal "ssh reboot" is not possible and force a power cycle.
In this case, the "start_monitor" is executed, but the "end_monitor" is not, and this causes the screen will not be given back to the console. That is, after the test, a "reset" command needs to be performed, as "echo" is turned off.
Cc: stable@vger.kernel.org Fixes: 6474ace999edd ("ktest.pl: Powercycle the box on reboot if no connection can be made") Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
show more ...
|
| 88a51b4f | 08-Dec-2022 |
Steven Rostedt (Google) <rostedt@goodmis.org> |
ktest.pl: Add shell commands to variables
Allow variables to execute shell commands. Note, these are processed when they are first seen while parsing the config file. This is useful if you have the
ktest.pl: Add shell commands to variables
Allow variables to execute shell commands. Note, these are processed when they are first seen while parsing the config file. This is useful if you have the same config file used for multiple hosts (as they may be in a git repository).
HOSTNAME := ${shell hostname} DEFAULTS IF "${HOSTNAME}" == "frodo"
Link: https://lkml.kernel.org/r/20221207212944.277ee850@gandalf.local.home
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
show more ...
|
| 26df05a8 | 30-Nov-2022 |
Steven Rostedt <rostedt@goodmis.org> |
kest.pl: Fix grub2 menu handling for rebooting
grub2 has submenus where to use grub-reboot, it requires:
grub-reboot X>Y
where X is the main index and Y is the submenu. Thus if you have:
menuen
kest.pl: Fix grub2 menu handling for rebooting
grub2 has submenus where to use grub-reboot, it requires:
grub-reboot X>Y
where X is the main index and Y is the submenu. Thus if you have:
menuentry 'Debian GNU/Linux' --class debian --class gnu-linux ... [...] } submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option ... menuentry 'Debian GNU/Linux, with Linux 6.0.0-4-amd64' --class debian --class gnu-linux ... [...] } menuentry 'Debian GNU/Linux, with Linux 6.0.0-4-amd64 (recovery mode)' --class debian --class gnu-linux ... [...] } menuentry 'Debian GNU/Linux, with Linux test' --class debian --class gnu-linux ... [...] }
And wanted to boot to the "Linux test" kernel, you need to run:
# grub-reboot 1>2
As 1 is the second top menu (the submenu) and 2 is the third of the sub menu entries.
Have the grub.cfg parsing for grub2 handle such cases.
Cc: stable@vger.kernel.org Fixes: a15ba91361d46 ("ktest: Add support for grub2") Reviewed-by: John 'Warthog9' Hawley (VMware) <warthog9@eaglescrag.net> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
show more ...
|