| 776735b9 | 02-Sep-2024 |
Ba Jing <[email protected]> |
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/[email protected] Signed-off-by: Ba Jing <[email protected]> Signed-off-by: Steven Rostedt <[email protected]>
show more ...
|
| 2351e8c6 | 04-Sep-2024 |
Daniel Jordan <[email protected]> |
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/[email protected] Signed-off-by: Daniel Jordan <[email protected]> Acked-by: John 'Warthog9' Hawley (Tenstorrent) <[email protected]> Signed-off-by: Steven Rostedt <[email protected]>
show more ...
|
| 07283c18 | 15-Mar-2024 |
Ricardo B. Marliere <[email protected]> |
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/[email protected]
Cc: John Hawley <[email protected]> Signed-off-by: Ricardo B. Marliere <[email protected]> Signed-off-by: Steven Rostedt <[email protected]>
show more ...
|
| 7dc8e24f | 20-Jan-2023 |
Masami Hiramatsu (Google) <[email protected]> |
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 <[email protected]> Signed-off-by: Masami Hiramatsu (Google) <[email protected]> Signed-off-by: Steven Rostedt <[email protected]>
show more ...
|
| 4e7d2a8f | 18-Jan-2023 |
Steven Rostedt <[email protected]> |
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: [email protected] Fixes: 6e98d1b4415fe ("ktest: Add timeout to ssh command") Signed-off-by: Steven Rostedt <[email protected]>
show more ...
|
| 83d29d43 | 18-Jan-2023 |
Steven Rostedt <[email protected]> |
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: [email protected] Fixes: 9f2cdcbbb90e7 ("ktest: Give console process a dedicated tty") Signed-off-by: Steven Rostedt <[email protected]>
show more ...
|
| e8bf9b98 | 18-Jan-2023 |
Steven Rostedt <[email protected]> |
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: [email protected] Fixes: 6474ace999edd ("ktest.pl: Powercycle the box on reboot if no connection can be made") Signed-off-by: Steven Rostedt <[email protected]>
show more ...
|
| 88a51b4f | 08-Dec-2022 |
Steven Rostedt (Google) <[email protected]> |
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/[email protected]
Signed-off-by: Steven Rostedt (Google) <[email protected]>
show more ...
|
| 26df05a8 | 30-Nov-2022 |
Steven Rostedt <[email protected]> |
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: [email protected] Fixes: a15ba91361d46 ("ktest: Add support for grub2") Reviewed-by: John 'Warthog9' Hawley (VMware) <[email protected]> Signed-off-by: Steven Rostedt <[email protected]>
show more ...
|
| 6a0f3652 | 20-Apr-2021 |
John 'Warthog9' Hawley (VMware) <[email protected]> |
ktest: Re-arrange the code blocks for better discoverability
Perl, as with most scripting languages, is fairly flexible in how / where you can define things, and it will (for the most part) do what
ktest: Re-arrange the code blocks for better discoverability
Perl, as with most scripting languages, is fairly flexible in how / where you can define things, and it will (for the most part) do what you would expect it to do. This however can lead to situations, like with ktest, where things get muddled over time.
This pushes the variable definitions back up to the top, followed by functions, with the main script executables down at the bottom, INSTEAD of being somewhat mish-mashed together in certain places. This mostly has the advantage of making it more obvious where things are initially defined, what functions are there, and ACTUALLY where the main script starts executing, and should make this a little more approachable.
Signed-off-by: John 'Warthog9' Hawley (VMware) <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
show more ...
|
| c043ccbf | 20-Apr-2021 |
John 'Warthog9' Hawley (VMware) <[email protected]> |
ktest: Further consistency cleanups
This cleans up some additional whitespace pieces that to be more consistent, as well as moving a curly brace around, and some 'or' statements to match the rest of
ktest: Further consistency cleanups
This cleans up some additional whitespace pieces that to be more consistent, as well as moving a curly brace around, and some 'or' statements to match the rest of the file (usually or goes at the end of the line vs. at the beginning)
Signed-off-by: John 'Warthog9' Hawley (VMware) <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
show more ...
|
| 12d4cddd | 20-Apr-2021 |
John 'Warthog9' Hawley (VMware) <[email protected]> |
ktest: Fixing indentation to match expected pattern
This is a followup to "ktest: Adding editor hints to improve consistency" to actually adjust the existing indentation to match the, now, expected
ktest: Fixing indentation to match expected pattern
This is a followup to "ktest: Adding editor hints to improve consistency" to actually adjust the existing indentation to match the, now, expected pattern (first column 4 spaces, 2nd tab, 3rd tab + 4 spaces, etc). This should, at least help, keep things consistent going forward now.
Signed-off-by: John 'Warthog9' Hawley (VMware) <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
show more ...
|
| becdd17b | 20-Apr-2021 |
John 'Warthog9' Hawley (VMware) <[email protected]> |
ktest: Adding editor hints to improve consistency
Emacs and Vi(m) have different styles of dealing with perl syntax which can lead to slightly inconsistent indentation, and makes the code slightly h
ktest: Adding editor hints to improve consistency
Emacs and Vi(m) have different styles of dealing with perl syntax which can lead to slightly inconsistent indentation, and makes the code slightly harder to read. Emacs assumes a more perl recommended standard of 4 spaces (1 column) or tab (two column) indentation.
Vi(m) tends to favor just normal spaces or tabs depending on what was being used.
This gives the basic hinting to Emacs and Vim to do what is expected to be basically consistent.
Emacs: - Explicitly flip into perl mode, cperl would require more adjustments
Vi(m): - Set softtabs=4 which will flip it over to doing indentation the way you would expect from Emacs
Signed-off-by: John 'Warthog9' Hawley (VMware) <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
show more ...
|
| 2676eb4b | 20-Apr-2021 |
John 'Warthog9' Hawley (VMware) <[email protected]> |
ktest: Add example config for using VMware VMs
This duplicates the KVM/Qemu config with specific notes for how to use it with VMware VMs on Workstation, Player, or Fusion. The main thing to be aware
ktest: Add example config for using VMware VMs
This duplicates the KVM/Qemu config with specific notes for how to use it with VMware VMs on Workstation, Player, or Fusion. The main thing to be aware of is how the serial port is exposed which is a unix pipe, and will need something like ncat to get into ktest's monitoring
Signed-off-by: John 'Warthog9' Hawley (VMware) <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
show more ...
|