Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'ktest-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest

Pull ktest updates from Steven Rostedt:

- Fix three instances that the tty is not given back to the console on
exit. Forcing the user to do a "reset" to get the console back.

- Fix the console monitor to not hang when too much data is given by
the ssh output.

* tag 'ktest-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest:
ktest: Restore stty setting at first in dodie
ktest.pl: Add RUN_TIMEOUT option with default unlimited
ktest.pl: Give back console on Ctrt^C on monitor
ktest.pl: Fix missing "end_monitor" when machine check fails

+31 -10
+26 -10
tools/testing/ktest/ktest.pl
··· 178 178 my $store_successes; 179 179 my $test_name; 180 180 my $timeout; 181 + my $run_timeout; 181 182 my $connect_timeout; 182 183 my $config_bisect_exec; 183 184 my $booted_timeout; ··· 341 340 "STORE_SUCCESSES" => \$store_successes, 342 341 "TEST_NAME" => \$test_name, 343 342 "TIMEOUT" => \$timeout, 343 + "RUN_TIMEOUT" => \$run_timeout, 344 344 "CONNECT_TIMEOUT" => \$connect_timeout, 345 345 "CONFIG_BISECT_EXEC" => \$config_bisect_exec, 346 346 "BOOTED_TIMEOUT" => \$booted_timeout, ··· 1497 1495 1498 1496 # Still need to wait for the reboot to finish 1499 1497 wait_for_monitor($time, $reboot_success_line); 1500 - 1498 + } 1499 + if ($powercycle || $time) { 1501 1500 end_monitor; 1502 1501 } 1503 1502 } ··· 1537 1534 # avoid recursion 1538 1535 return if ($in_die); 1539 1536 $in_die = 1; 1537 + 1538 + if ($monitor_cnt) { 1539 + # restore terminal settings 1540 + system("stty $stty_orig"); 1541 + } 1540 1542 1541 1543 my $i = $iteration; 1542 1544 ··· 1587 1579 1588 1580 send_email("KTEST: critical failure for test $i [$name]", 1589 1581 "Your test started at $script_start_time has failed with:\n@_\n", $log_file); 1590 - } 1591 - 1592 - if ($monitor_cnt) { 1593 - # restore terminal settings 1594 - system("stty $stty_orig"); 1595 1582 } 1596 1583 1597 1584 if (defined($post_test)) { ··· 1860 1857 $command =~ s/\$SSH_USER/$ssh_user/g; 1861 1858 $command =~ s/\$MACHINE/$machine/g; 1862 1859 1860 + if (!defined($timeout)) { 1861 + $timeout = $run_timeout; 1862 + } 1863 + 1864 + if (!defined($timeout)) { 1865 + $timeout = -1; # tell wait_for_input to wait indefinitely 1866 + } 1867 + 1863 1868 doprint("$command ... "); 1864 1869 $start_time = time; 1865 1870 ··· 1894 1883 1895 1884 while (1) { 1896 1885 my $fp = \*CMD; 1897 - if (defined($timeout)) { 1898 - doprint "timeout = $timeout\n"; 1899 - } 1900 1886 my $line = wait_for_input($fp, $timeout); 1901 1887 if (!defined($line)) { 1902 1888 my $now = time; 1903 - if (defined($timeout) && (($now - $start_time) >= $timeout)) { 1889 + if ($timeout >= 0 && (($now - $start_time) >= $timeout)) { 1904 1890 doprint "Hit timeout of $timeout, killing process\n"; 1905 1891 $hit_timeout = 1; 1906 1892 kill 9, $pid; ··· 2067 2059 2068 2060 if (!defined($time)) { 2069 2061 $time = $timeout; 2062 + } 2063 + 2064 + if ($time < 0) { 2065 + # Negative number means wait indefinitely 2066 + undef $time; 2070 2067 } 2071 2068 2072 2069 $rin = ''; ··· 4213 4200 } 4214 4201 4215 4202 sub cancel_test { 4203 + if ($monitor_cnt) { 4204 + end_monitor; 4205 + } 4216 4206 if ($email_when_canceled) { 4217 4207 my $name = get_test_name; 4218 4208 send_email("KTEST: Your [$name] test was cancelled",
+5
tools/testing/ktest/sample.conf
··· 817 817 # is issued instead of a reboot. 818 818 # CONNECT_TIMEOUT = 25 819 819 820 + # The timeout in seconds for how long to wait for any running command 821 + # to timeout. If not defined, it will let it go indefinitely. 822 + # (default undefined) 823 + #RUN_TIMEOUT = 600 824 + 820 825 # In between tests, a reboot of the box may occur, and this 821 826 # is the time to wait for the console after it stops producing 822 827 # output. Some machines may not produce a large lag on reboot