3e1d3678 | 21-Mar-2018 |
Steven Rostedt (VMware) <rostedt@goodmis.org> |
ktest: Add CONNECT_TIMEOUT to change the connection timeout time
Before ktest issues a reboot, it will try to connect to the target machine to make sure that it is still alive. If the target does no
ktest: Add CONNECT_TIMEOUT to change the connection timeout time
Before ktest issues a reboot, it will try to connect to the target machine to make sure that it is still alive. If the target does not respond within 5 seconds, it will power cycle the box instead of issuing a reboot.
Five seconds may be too short, and ktest may unnecessarially power cycle the box. I have found 25 seconds seems to be a better timeout for this purpose. But even 25 may be too arbitrary. Add a CONNECT_TIMEOUT option to let the user determine the timeout time before rebooting. By default, it has been raised to 25 seconds.
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
show more ...
|
f7c6401f | 08-Mar-2017 |
Steven Rostedt (VMware) <rostedt@goodmis.org> |
ktest: Make sure wait_for_input does honor the timeout
The function wait_for_input takes in a timeout, and even has a default timeout. But if for some reason the STDIN descriptor keeps sending in da
ktest: Make sure wait_for_input does honor the timeout
The function wait_for_input takes in a timeout, and even has a default timeout. But if for some reason the STDIN descriptor keeps sending in data, the function will never time out. The timout is to wait for the data from the passed in file descriptor, not for STDIN. Adding a test in the case where there's no data from the passed in file descriptor that checks to see if the timeout passed, will ensure that it will timeout properly even if there's input in STDIN.
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
show more ...
|
99c014a8 | 08-Mar-2017 |
Steven Rostedt (VMware) <rostedt@goodmis.org> |
ktest: Fix while loop in wait_for_input
The run_command function was changed to use the wait_for_input function to allow having a timeout if the command to run takes too much time. There was a bug i
ktest: Fix while loop in wait_for_input
The run_command function was changed to use the wait_for_input function to allow having a timeout if the command to run takes too much time. There was a bug in the wait_for_input where it could end up going into an infinite loop. There's two issues here. One is that the return value of the sysread wasn't used for the write (to write a proper size), and that it should continue processing the passed in file descriptor too even if there was input. There was no check for error, if for some reason STDIN returned an error, the function would go into an infinite loop and never exit.
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Tested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Fixes: 6e98d1b4415f ("ktest: Add timeout to ssh command") Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
show more ...
|
5739438b | 07-Feb-2017 |
Steven Rostedt (VMware) <rostedt@goodmis.org> |
ktest: Add variable run_command_status to save status of commands executed
Create a variable called run_command_status that saves the status of the executed commands and can be used by other functio
ktest: Add variable run_command_status to save status of commands executed
Create a variable called run_command_status that saves the status of the executed commands and can be used by other functions later to test for status.
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
show more ...
|
6474ace9 | 07-Feb-2017 |
Steven Rostedt (VMware) <rostedt@goodmis.org> |
ktest.pl: Powercycle the box on reboot if no connection can be made
When performing a reboot of the test box, try to ssh to it. If it can't connect for 5 seconds, then powercycle the box. This is us
ktest.pl: Powercycle the box on reboot if no connection can be made
When performing a reboot of the test box, try to ssh to it. If it can't connect for 5 seconds, then powercycle the box. This is useful because the reboot is done via ssh, and if you can't ssh to the box because it is hung, the reboot fails to reboot.
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
show more ...
|
6e98d1b4 | 07-Feb-2017 |
Steven Rostedt (VMware) <rostedt@goodmis.org> |
ktest: Add timeout to ssh command
Add a timeout to performing an ssh command. This will let testing if a machine is alive or not, or if something else may be amiss. A timeout can be passed to ssh, w
ktest: Add timeout to ssh command
Add a timeout to performing an ssh command. This will let testing if a machine is alive or not, or if something else may be amiss. A timeout can be passed to ssh, where ssh will fail if it does not complete within the given timeout.
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
show more ...
|
32677207 | 07-Feb-2017 |
Steven Rostedt (VMware) <rostedt@goodmis.org> |
ktest: Fix child exit code processing
The child_exit errno needs to be shifted by 8 bits to compare against the return values for the bisect variables.
Fixes: c5dacb88f0a64 ("ktest: Allow overridin
ktest: Fix child exit code processing
The child_exit errno needs to be shifted by 8 bits to compare against the return values for the bisect variables.
Fixes: c5dacb88f0a64 ("ktest: Allow overriding bisect test results") Cc: stable@vger.kernel.org Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
show more ...
|
7c2c49ec | 03-Feb-2015 |
Steven Rostedt (Red Hat) <rostedt@goodmis.org> |
ktest: Place quotes around item variable
Seems that some of the new console logic causes doprint to possibly get evaluated. When printing a commit message that contains parenthesis, it fails with a
ktest: Place quotes around item variable
Seems that some of the new console logic causes doprint to possibly get evaluated. When printing a commit message that contains parenthesis, it fails with a shell parsing error.
This gets fixed when we add quotes around the $item variable, and prevent it from being evaluated by any shell commands.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
show more ...
|
1cb9e642 | 29-Jan-2015 |
Josh Poimboeuf <jpoimboe@redhat.com> |
ktest: Cleanup terminal on dodie() failure
If dodie() is called with the console open, restore the terminal's original settings before dying.
Link: http://lkml.kernel.org/r/20150130025453.GB20952@t
ktest: Cleanup terminal on dodie() failure
If dodie() is called with the console open, restore the terminal's original settings before dying.
Link: http://lkml.kernel.org/r/20150130025453.GB20952@treble.redhat.com
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
show more ...
|
4bf6e1fc | 29-Jan-2015 |
Steven Rostedt (Red Hat) <rostedt@goodmis.org> |
ktest: Print build,install,boot,test times at success and failure
Since both success and failure may shortcut and exit ktest, it is better to print the status times there too. Once times are printed
ktest: Print build,install,boot,test times at success and failure
Since both success and failure may shortcut and exit ktest, it is better to print the status times there too. Once times are printed, the values for the times are reset, so they will not print more than once.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
show more ...
|
9d2f7f05 | 28-Jan-2015 |
Josh Poimboeuf <jpoimboe@redhat.com> |
ktest: Enable user input to the console
Allow the user to send input to the console by putting the terminal in cbreak mode (to allow reading stdin one character at a time) and copying all stdin data
ktest: Enable user input to the console
Allow the user to send input to the console by putting the terminal in cbreak mode (to allow reading stdin one character at a time) and copying all stdin data to the console's pty.
Link: http://lkml.kernel.org/r/bb1bbe7d202c95a3ce7894cfffdd8c725875978e.1422473610.git.jpoimboe@redhat.com
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
show more ...
|
9f2cdcbb | 28-Jan-2015 |
Josh Poimboeuf <jpoimboe@redhat.com> |
ktest: Give console process a dedicated tty
Create a pseudoterminal (pty pair) to give the console a dedicated tty so it doesn't mess with ktest's terminal settings.
Link: http://lkml.kernel.org/r/
ktest: Give console process a dedicated tty
Create a pseudoterminal (pty pair) to give the console a dedicated tty so it doesn't mess with ktest's terminal settings.
Link: http://lkml.kernel.org/r/37b0127f9efad09ff4fc994334db998141e4f6ca.1422473610.git.jpoimboe@redhat.com
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
show more ...
|
64d98283 | 28-Jan-2015 |
Steven Rostedt (Red Hat) <rostedt@goodmis.org> |
ktest: Rename start_monitor_and_boot to start_monitor_and_install
The function start_monitor_and_boot is a misnomer. It use to, but now it starts the monitor and installs. It does not boot. Rename i
ktest: Rename start_monitor_and_boot to start_monitor_and_install
The function start_monitor_and_boot is a misnomer. It use to, but now it starts the monitor and installs. It does not boot. Rename it before I get confused by it again.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
show more ...
|
38fa3dc1 | 28-Jan-2015 |
Steven Rostedt (Red Hat) <rostedt@goodmis.org> |
ktest: Show times for build, install, boot and test
Seeing the times for how long a build, install, reboot and the test takes is helpful for analyzing the test process. Seeing how different changes
ktest: Show times for build, install, boot and test
Seeing the times for how long a build, install, reboot and the test takes is helpful for analyzing the test process. Seeing how different changes affect the timings.
Show the build, install, boot and test times when at the end of the test, or between each interval for tests that do those mulitple times (like bisect and patchcheck).
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
show more ...
|
98842782 | 27-Jan-2015 |
Josh Poimboeuf <jpoimboe@redhat.com> |
ktest: Restore tty settings after closing console
When ktest runs the console program as a child process, the parent and child share the same tty for stdin and stderr. This is problematic when usin
ktest: Restore tty settings after closing console
When ktest runs the console program as a child process, the parent and child share the same tty for stdin and stderr. This is problematic when using a libvirt target. The "virsh console" program makes a lot of changes to the tty settings, making ktest's output hard to read (carriage returns don't work). After ktest exits, the terminal is unusable (CRs broken, stdin isn't echoed).
I think the best way to fix this issue would be to create a pseudoterminal (pty pair) so the child process would have a dedicated tty, and then use pipes to connect the two ttys. I'm not sure if that's overkill, but it's far beyond my current Perl abilities.
This patch is a much easier way to (partially) fix this issue. It saves the tty settings before opening the console and restores them after closing it. There are still a few places where ktest prints mangled output while the console is open, but the output is much more legible overall, and the terminal works just fine after ktest exits.
Link: http://lkml.kernel.org/r/1bb89abc0025cf1d6da657c7ba58bbeb4381a515.1422382008.git.jpoimboe@redhat.com
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
show more ...
|
17150fef | 23-Nov-2014 |
Steven Rostedt (Red Hat) <rostedt@goodmis.org> |
ktest: Add back "tail -1" to kernelrelease make
Commit 52d21580b362 "ktest: Use make -s kernelrelease" fixed commit 7ff525712acf "kbuild: fake the "Entering directory ..." message more simply" as th
ktest: Add back "tail -1" to kernelrelease make
Commit 52d21580b362 "ktest: Use make -s kernelrelease" fixed commit 7ff525712acf "kbuild: fake the "Entering directory ..." message more simply" as that commit added output after the make kernelrelease. But there's still some build scripts that are used by ktest that has output before the make is executed, and requires that only the last line is printed.
Cc: Michal Marek <mmarek@suse.cz> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
show more ...
|
18656c70 | 21-Nov-2014 |
Steven Rostedt (Red Hat) <rostedt@goodmis.org> |
ktest: Add name to running title
Instead of just showing the test type of test in the start of the test, like this:
RUNNING TEST 1 of 26 with option build defconfig
Add the name (if it is define
ktest: Add name to running title
Instead of just showing the test type of test in the start of the test, like this:
RUNNING TEST 1 of 26 with option build defconfig
Add the name (if it is defined) as well, like this:
RUNNING TEST 1 of 26 (arm64 aarch64-linux) with option build defconfig
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
show more ...
|