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 | 07-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 ...
|
6a0f3652 | 19-Apr-2021 |
John 'Warthog9' Hawley (VMware) <warthog9@eaglescrag.net> |
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) <warthog9@eaglescrag.net> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
show more ...
|
c043ccbf | 19-Apr-2021 |
John 'Warthog9' Hawley (VMware) <warthog9@eaglescrag.net> |
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) <warthog9@eaglescrag.net> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
show more ...
|
12d4cddd | 19-Apr-2021 |
John 'Warthog9' Hawley (VMware) <warthog9@eaglescrag.net> |
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) <warthog9@eaglescrag.net> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
show more ...
|
becdd17b | 19-Apr-2021 |
John 'Warthog9' Hawley (VMware) <warthog9@eaglescrag.net> |
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) <warthog9@eaglescrag.net> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
show more ...
|
2676eb4b | 19-Apr-2021 |
John 'Warthog9' Hawley (VMware) <warthog9@kernel.org> |
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) <warthog9@eaglescrag.net> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
show more ...
|
170f4869 | 30-Nov-2020 |
Steven Rostedt (VMware) <rostedt@goodmis.org> |
ktest.pl: Fix the logic for truncating the size of the log file for email
The logic for truncating the log file for emailing based on the MAIL_MAX_SIZE option is confusing and incorrect. Simplify it
ktest.pl: Fix the logic for truncating the size of the log file for email
The logic for truncating the log file for emailing based on the MAIL_MAX_SIZE option is confusing and incorrect. Simplify it and have the tail of the log file truncated to the max size specified in the config.
Cc: stable@vger.kernel.org Fixes: 855d8abd2e8ff ("ktest.pl: Change the logic to control the size of the log file emailed") Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
show more ...
|
8cd6bc03 | 30-Nov-2020 |
Steven Rostedt (VMware) <rostedt@goodmis.org> |
ktest.pl: If size of log is too big to email, email error message
If the size of the error log is too big to send via email, and the sending fails, it wont email any result. This can be confusing fo
ktest.pl: If size of log is too big to email, email error message
If the size of the error log is too big to send via email, and the sending fails, it wont email any result. This can be confusing for the user who is waiting for an email on the completion of the tests.
If it fails to send email, then try again without the log file stating that it failed to send an email. Obviously this will not be of use if the sending of email failed for some other reasons, but it will at least give the user some information when it fails for the most common reason.
Cc: stable@vger.kernel.org Fixes: c2d84ddb338c8 ("ktest.pl: Add MAIL_COMMAND option to define how to send email") Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
show more ...
|
ff131eff | 10-Aug-2020 |
Colin Ian King <colin.king@canonical.com> |
ktest.pl: Fix spelling mistake "Cant" -> "Can't"
There is a spelling mistake in an error message. Fix it.
Link: https://lkml.kernel.org/r/20200810100750.61475-1-colin.king@canonical.com
Signed-off
ktest.pl: Fix spelling mistake "Cant" -> "Can't"
There is a spelling mistake in an error message. Fix it.
Link: https://lkml.kernel.org/r/20200810100750.61475-1-colin.king@canonical.com
Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
show more ...
|
855d8abd | 02-Jul-2020 |
Steven Rostedt (VMware) <rostedt@goodmis.org> |
ktest.pl: Change the logic to control the size of the log file emailed
If the log file for a given test is larger than the max size given then use set the seek from the end of the log file instead o
ktest.pl: Change the logic to control the size of the log file emailed
If the log file for a given test is larger than the max size given then use set the seek from the end of the log file instead of from the start of the test.
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
show more ...
|
f9869002 | 01-Jul-2020 |
Steven Rostedt (VMware) <rostedt@goodmis.org> |
ktest.pl: Add MAIL_MAX_SIZE to limit the amount of log emailed
Add the ktest config option MAIL_MAX_SIZE that will limit the size of the log file that is placed into the email on failure.
Link: htt
ktest.pl: Add MAIL_MAX_SIZE to limit the amount of log emailed
Add the ktest config option MAIL_MAX_SIZE that will limit the size of the log file that is placed into the email on failure.
Link: https://lore.kernel.org/r/20200701231756.790637968@goodmis.org
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
show more ...
|