aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/ktest (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-03-08Merge tag 'ktest-v4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktestLinus Torvalds1-8/+13
Pull ktest fixes from Steven Rostedt: "Greg Kroah-Hartman reported to me that the ktest of v4.11-rc1 locked up in an infinite loop while doing the make mrproper. Looking into the cause I noticed that a recent update to the function run_command (used for running all shell commands, including "make mrproper") changed the internal loop to use the function wait_for_input. The wait_for_input function uses select to look at two file descriptors. One is the file descriptor of the command it is running, the other is STDIN. The STDIN check was not checking the return status of the sysread call, and was also just writing a lot of data into syswrite without regard to the size of the data read. Changing the code to check the return status of sysread, and also to still process the passed in descriptor data without looping back to the select fixed Greg's problem. While looking at this code I also realized that the loop did not honor the timeout if STDIN always had input (or for some reason return error). this could prevent wait_for_input to timeout on the file descriptor it is suppose to be waiting for. That is fixed too" * tag 'ktest-v4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest: ktest: Make sure wait_for_input does honor the timeout ktest: Fix while loop in wait_for_input
2017-03-08ktest: Make sure wait_for_input does honor the timeoutSteven Rostedt (VMware)1-7/+11
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>
2017-03-08ktest: Fix while loop in wait_for_inputSteven Rostedt (VMware)1-3/+4
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>
2017-02-27Merge tag 'ktest-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktestLinus Torvalds1-35/+76
Pull ktest updates from Steven Rostedt: "These are various fixes that I have made and never got around to pushing. I've been asked to get the upstream repo back up-to-date" * tag 'ktest-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest: ktest: Add variable run_command_status to save status of commands executed ktest.pl: Powercycle the box on reboot if no connection can be made ktest: Add timeout to ssh command ktest: Fix child exit code processing ktest: Have POST_TEST run after the test has totally completed
2017-02-07ktest: Add variable run_command_status to save status of commands executedSteven Rostedt (VMware)1-11/+11
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>
2017-02-07ktest.pl: Powercycle the box on reboot if no connection can be madeSteven Rostedt (VMware)1-11/+29
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>
2017-02-07ktest: Add timeout to ssh commandSteven Rostedt (VMware)1-8/+27
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>
2017-02-07ktest: Fix child exit code processingSteven Rostedt (VMware)1-1/+1
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>
2017-02-07ktest: Have POST_TEST run after the test has totally completedSteven Rostedt (VMware)1-8/+12
The POST_TEST config is to be executed after a test has fully compeleted, whether the test passed or failed. It currently is executed at the moment that the test has been decided if it failed or not. As the test does other clean ups, it isn't truly finished. Move the POST_TEST execution to after all the test cleanups have been done. Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
2016-12-14ktest.pl: fix englishPavel Machek1-4/+4
Ajdust spelling to more common "mandatory". Variant "mandidory" is certainly wrong. Link: http://lkml.kernel.org/r/20161011073003.GA19476@amd Signed-off-by: Pavel Machek <pavel@ucw.cz> Acked-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-02-03ktest: Place quotes around item variableSteven Rostedt (Red Hat)1-1/+1
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>
2015-02-02ktest: Cleanup terminal on dodie() failureJosh Poimboeuf1-1/+6
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>
2015-02-02ktest: Print build,install,boot,test times at success and failureSteven Rostedt (Red Hat)1-0/+4
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>
2015-02-02ktest: Enable user input to the consoleJosh Poimboeuf1-15/+36
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>
2015-02-02ktest: Give console process a dedicated ttyJosh Poimboeuf1-9/+57
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>
2015-01-29ktest: Rename start_monitor_and_boot to start_monitor_and_installSteven Rostedt (Red Hat)1-5/+5
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>
2015-01-29ktest: Show times for build, install, boot and testSteven Rostedt (Red Hat)1-4/+105
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>
2015-01-27ktest: Restore tty settings after closing consoleJosh Poimboeuf1-0/+7
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>
2015-01-27ktest: Add timings for commandsSteven Rostedt (Red Hat)1-0/+13
I find that I usually like to see how long a make or other command takes, and adding a start and end time and reporting how long each command runs (in seconds) is helpful. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-11-23ktest: Add back "tail -1" to kernelrelease makeSteven Rostedt (Red Hat)1-1/+1
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>
2014-11-21ktest: Add name to running titleSteven Rostedt (Red Hat)1-1/+7
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>
2014-11-21ktest: Allow tests to undefine default optionsSteven Rostedt (Red Hat)1-8/+15
Tests can set options that override the default ones. But if a test tries to undefine a default option, it is simply ignored and the default option stays as is. For example, if you want to have a test that defines no MIN_CONFIG then the test should be able to do that with: TEST_START MIN_CONFIG = Which should make MIN_CONFIG not defined for that test. But the way the code currently works, undefined options in tests are dropped. This is because the NULL options are evaluated during the reading of the config file and since one can disable default options in the default section with this method, it is evaluated there (the option turns to a undef). But undef options in the test section mean to use the default option. To fix this, keep the empty string in the option during the reading of the config file, and then evaluate it when running the test. This will allow tests to null out default options. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-11-21ktest: Fix make_min_config to handle new assign_configs callSteven Rostedt (Red Hat)1-1/+3
Commit 6071c22e1755 "ktest: Rewrite the config-bisect to actually work" fixed the config-bisect to work nicely but in doing so it broke make_min_config by changing the way assign_configs works. The assign_configs function now adds the config to the hash even if it is disabled, but changes the hash value to be that of the line "# CONFIG_FOO is not set". Unfortunately, the make_min_config test only checks to see if the config is removed. It now needs to check if the config is in the hash and not set to be disabled. Cc: stable@vger.kernel.org # 3.17+ Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-11-21ktest: Use make -s kernelreleaseMichal Marek1-1/+1
The previous tail -1 broke with commit 7ff525712acf ("kbuild: fake the "Entering directory ..." message more simply") Link: http://lkml.kernel.org/r/20141022194408.GA20989@pobox.suse.cz Reported-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-10-07ktest: Don't bother with bisect good or bad on replaySteven Rostedt (Red Hat)1-6/+8
If git bisect reply is being used in the bisect tests, don't bother doing the git bisect good or git bisect bad calls. The git bisect reply will override them anyway, and that's called immediately after the other two. Going the git bisect (good|bad) is just a waste of time. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-10-07ktest: Fix check for new kernel success on rebooting to good kernelSteven Rostedt (Red Hat)1-0/+6
The reboot function when rebooting back to a good kernel has a check to make sure that a new kernel was indeed booted. But that check uses a timeout value, which when calling the monitor will still return success if the timeout is hit (no bug was found). It should return an error to let the reboot code know that a new kernel was not reached. Only the reboot code checks the return value of the monitor. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-09-19ktest: add ability to skip during BISECT_MANUALChris J Arges1-2/+4
When doing a manual bisect, a build can fail or a test can be inconclusive. In these cases it would be helpful to be able to skip the test entirely. Link: http://lkml.kernel.org/r/1409164021-2136-1-git-send-email-chris.j.arges@canonical.com Reviewed-by: Satoru Takeuchi <satoru.takeuchi@gmail.com> Signed-off-by: Chris J Arges <chris.j.arges@canonical.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-09-19ktest: Add PATCHCHECK_CHERRYSteven Rostedt (Red Hat)2-6/+39
Add a way to run a patchcheck test on the commits that are in one branch but not in another. This uses git cherry to find a list of commits to test each one with. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-04-23ktest: Update documentation on config_bisectSteven Rostedt (Red Hat)1-38/+27
With the more robust config_bisect, the documentation is out of date and needs to be updated. The new rewrite allows for finding missing configs and such, and is much more robust to use. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-04-23ktest: Add the config bisect manual backSteven Rostedt (Red Hat)1-1/+7
After the rewrite of the config bisect, the bisect manual was removed. Add it back. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-04-23ktest: Remove unused functionsSteven Rostedt (Red Hat)1-62/+1
After the rewrite of the config bisect, there were several unused functions that can be removed. One of the unused functions printed out the failed config nicer than what the rewrite did, so I kept that and used it to output the bad config. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-04-23ktest: Put back in the CONFIG_BISECT_CHECKSteven Rostedt (Red Hat)1-2/+23
The new rewrite left out the CONFIG_BISECT_CHECK, which allows the user to test that their "bad" config still is bad and their "good" config still is good. This is especially important as the configs are passed through a "make oldconfig" to update them with the lastest kernel. Things could change that causes a bad config to work, or a good config to break. The check is done after the configs have run through the oldconfig processing. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-04-23ktest: Rewrite the config-bisect to actually workSteven Rostedt (Red Hat)1-226/+226
I never liked the way config-bisect worked. I would assume the bad config had some config that broke the system. But it would not work if the bad config just happened to be missing something that the good config had. I rewrote the config-bisect to do this properly. It does a diff of the two configs, and sets half of the configs that are in one and not the other. The way it works is that when it "sets", it really just makes one copy what the other has. That is, a "set" can be setting a: # CONFIG_FOO is not set Basically, it looks at the differences between the two files and makes them similar until it comes down to one config that makes it work or not work depending on if it is set or not. Note, if more than one config change makes the bad config not work, it will only find one of them. But this is true with all bisect logic. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-04-23ktest: Some cleanup for improving readabilitySatoru Takeuchi1-22/+20
Some cleanup for improving readability as follows. - Initialize $ktest_config at its definition. - Put parentheses around the `config-file' argument in the usage message because it's a optional one. - Rename get_ktest_config{,s} to more descriptive get_mandatory_config{,s}. Link: http://lkml.kernel.org/r/87fvmr30kb.wl%satoru.takeuchi@gmail.com Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-04-23ktest: add 2nd parameter of run_command() to set the redirect target fileSatoru Takeuchi1-8/+3
If we'd like to set the redirect target file of run_command(), we should define $redirect before calling this function and should undef it after calling this function. Since it's user-unfriendly, add 2nd parameter of run_command() for this purpose. Link: http://lkml.kernel.org/r/87vbvwokq8.wl%satoru.takeuchi@gmail.com Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-02-26ktest: Set CLOSE_CONSOLE_SIGNAL in the kvm.confSatoru Takeuchi1-0/+4
As mentioned at commit 5a5d8e48449, we can't terminate 'virsh console' with the default signal(INT). So it's better to set CLOSE_CONSOLE_SIGNAL in the kvm.conf. Link: http://lkml.kernel.org/r/8738jatylb.wl%satoru.takeuchi@gmail.com Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com> [ Typo fixed by ] Signed-off-by: MUNEDA Takahiro <muneda.takahiro@jp.fujitsu.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-01-20Merge tag 'ktest-v3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktestLinus Torvalds2-32/+147
Pull ktest updates from Steven Rostedt: "Here's some basic updates to ktest.pl. They include: - add config to modify the signal to terminate console - update to documentation (missing some config options) - add KERNEL_VERSION variable to use for other configs - add '=~' to let configs eval other configs - add BISECT_TRIES to run multiple tests per git bisect good" * tag 'ktest-v3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest: ktest: Add BISECT_TRIES to bisect test ktest: Add eval '=~' command to modify variables in config file ktest: Add special variable ${KERNEL_VERSION} ktest: Add documentation of CLOSE_CONSOLE_SIGNAL ktest: Make the signal to terminate the console configurable
2014-01-18ktest: Add BISECT_TRIES to bisect testSteven Rostedt (Red Hat)2-2/+36
For those cases that it takes several tries to hit a bug, it would be useful for ktest.pl to try a test multiple times before it considers the test as a pass. To accomplish this, BISECT_TRIES ktest config option has been added. It is default to one, as most of the time a bisect only needs to try a test once. But the user can now up this to make ktest run a given test multiple times. The first failure that is detected will set a bisect bad. It only repeats on success. Note, as with all race bugs, there's no guarantee that if it succeeds, it is really a good bisect. But it helps in case the bug is somewhat reliable. You can set BISECT_TRIES to zero, and all tests will be considered good, unless you also set BISECT_MANUAL. Suggested-by: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2013-12-11ktest: Add eval '=~' command to modify variables in config fileSteven Rostedt (Red Hat)1-21/+81
With the added variable ${KERNEL_VERSION}, it is useful to be able to use parts of it for other variables. For example, if you want to create a warnings file for each major kernel version to test sub versions against you can create your warnings file with like this: WARNINGS_FILE = warnings-file-${KERNEL_VERSION} But this may add 3.8.12 or something, and we want all 3.8.* to use the same file, and 3.10.* to use another file, and so on. With the eval command we can, by adding: WARNINGS_FILE =~ s/(-file-\d+\.\d+).*/$1/ Which will chop off the extra characters after the 3.8. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2013-12-11ktest: Add special variable ${KERNEL_VERSION}Steven Rostedt (Red Hat)1-8/+19
Add a special variable that can be used in other variables called ${KERNEL_VERSION}. This will embed the current kernel version into the variable. For example: WARNINGS_FILE = ${OUTPUT_DIR}/warnings-${KERNEL_VERSION} If the current version is v3.8 then the WARNINGS_FILE will become ${OUTPUT_DIR}/warnings-v3.8 Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2013-12-03ktest: Add documentation of CLOSE_CONSOLE_SIGNALSteven Rostedt (Red Hat)1-0/+7
The sample.conf file needs to document all available options. With the new CLOSE_CONSOE_SIGNAL option, it too needs to be document. Cc: Satoru Takeuchi <satoru.takeuchi@gmail.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2013-12-03ktest: Make the signal to terminate the console configurableSatoru Takeuchi1-1/+4
Currently ktest sends SIGINT to terminate the console. However, there are consoles which do not exit by this signal, for example, in my case, "virsh console <guest OS>". In such case, ktest is blocked in close_console(). It prevents this automate test. This patch adds new option CLOSE_CONSOLE_SIGNAL which mean the signal to terminate the console. Since its default value is "INT", the original behavior isn't changed. Link: http://lkml.kernel.org/r/87zjol8pl5.wl%satoru.takeuchi@gmail.com Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2013-09-16Drop support for Renesas H8/300 (h8300) architectureGuenter Roeck1-6/+0
H8/300 has been dead for several years, and the kernel for it has not compiled for ages. Drop support for it. Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-05-28treewide: Fix typo in printkMasanari Iida1-1/+1
Correct spelling typo in various part of drivers Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2013-04-24ktest: Reset grub menu cache with different machinesSteven Rostedt (Red Hat)1-2/+7
Different tests may use a different machine. In such cases, we need to try to get the current grub menu index. If the same grub menu is used for two different machines, it may not be at the same index on the second machine. A search for the index must be performed again. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2013-03-08ktest: Allow tests to use different GRUB_MENUsSteven Rostedt (Red Hat)1-2/+7
To save connecting and searching for a given grub menu for each test, ktest.pl will cache the grub number it found. The problem is that different tests might use a different grub menu, but ktest.pl will ignore it. Instead, have ktest.pl check if the grub menu it used to cache the content is the same as when it grabbed the menu. If not, grab it again, otherwise just return the cached value. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2013-02-18ktest: Remove indexes from warnings checkSteven Rostedt (Red Hat)1-8/+26
The index of a line where a warning is tested can be returned differently on different versions of gcc (or same version compiled differently). That is, a tab + space can give different results. This causes the warning check to produce a false positive. Removing the index from the check fixes this issue. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2013-02-05ktest: Ignore warnings during rebootSteven Rostedt (Red Hat)1-0/+8
The reboot just wants to get to the next kernel. But if a warning (Call Trace) appears, the monitor will report an error, and the reboot will think something went wrong and power cycle the box, even though we successfully made it to the next kernel. Ignore warnings during the reboot until we get to the next kernel. It will still timeout if we never get to the next kernel and then a power cycle will happen. That's what we want it to do. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2013-02-05ktest: Search for linux banner for successful rebootSteven Rostedt (Red Hat)1-1/+6
Sometimes when a test kernel passed fine, but on reboot it crashed, ktest could get stuck and not proceed. This would be frustrating if you let a test run overnight to find out the next morning that it was stuck on the first test. To fix this, I made reboot check for the REBOOT_SUCCESS_LINE. If the line was not detected, then it would power cycle the box. What it didn't cover was if the REBOOT_SUCCESS_LINE wasn't defined or if a 'good' kernel did not display the line. Instead have it search for the Linux banner "Linux version". The reboot just needs to get to the start of the next kernel, it does not need to test if the next kernel makes it to a boot prompt. After we find the next kernel has booted, then we just wait for either the REBOOT_SUCCESS_LINE to appear or the timeout. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2013-01-31ktest: Add make_warnings_file and process full warningsSteven Rostedt (Red Hat)3-6/+185
Although the patchcheck test checks for warnings in the files that were changed, this check does not catch warnings that were caused by header file changes and the warnings appear in C files not touched by the commit. Add a new option called WARNINGS_FILE. If this option is set, then the file it points to is read before bulid, and the file should contain a list of known warnings. If a warning appears in the build, this file is checked, and if the warning does not exist in this file, then it fails the build showing the new warning. If the WARNINGS_FILE points to a file that does not exist, this will cause any warning in the build to fail. A new test is also added called "make_warnings_file". This test will create do a build and record any warnings it finds into the WARNINGS_FILE. This test is something that can be run before other tests to build a warnings file of "known warnings", ie, warnings that were there before your changes. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>