aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2013-01-30 12:25:38 -0500
committerSteven Rostedt <rostedt@goodmis.org>2013-01-30 12:25:38 -0500
commit319ab14f051aeb04d6da20d82b389ad875083041 (patch)
tree8605b97535243cd4ccc6d6c5875a47811ea631b2
parent949db153b6466c6f7cad5a427ecea94985927311 (diff)
ktest: Do not require CONSOLE for build or install bisects
If the user is doing a build or install bisect, there's no reason to have them define CONSOLE, as the console does not need to be read. The console only needs to be read for boot tests. CONSOLE is not required for normal build or install tests, let's not require it for bisect tests with BISECT_TYPE of build or install. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rwxr-xr-xtools/testing/ktest/ktest.pl27
1 files changed, 22 insertions, 5 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index 35fc584a4ffe..d6690df5e7f1 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -619,6 +619,18 @@ sub set_value {
619 # Note if a test is something other than build, then we 619 # Note if a test is something other than build, then we
620 # will need other manditory options. 620 # will need other manditory options.
621 if ($prvalue ne "install") { 621 if ($prvalue ne "install") {
622 # for bisect, we need to check BISECT_TYPE
623 if ($prvalue ne "bisect") {
624 $buildonly = 0;
625 }
626 } else {
627 # install still limits some manditory options.
628 $buildonly = 2;
629 }
630 }
631
632 if ($buildonly && $lvalue =~ /^BISECT_TYPE(\[.*\])?$/ && $prvalue ne "build") {
633 if ($prvalue ne "install") {
622 $buildonly = 0; 634 $buildonly = 0;
623 } else { 635 } else {
624 # install still limits some manditory options. 636 # install still limits some manditory options.
@@ -1279,6 +1291,7 @@ sub start_monitor {
1279} 1291}
1280 1292
1281sub end_monitor { 1293sub end_monitor {
1294 return if (!defined $console);
1282 if (--$monitor_cnt) { 1295 if (--$monitor_cnt) {
1283 return; 1296 return;
1284 } 1297 }
@@ -1585,7 +1598,7 @@ sub wait_for_input
1585 1598
1586 $rin = ''; 1599 $rin = '';
1587 vec($rin, fileno($fp), 1) = 1; 1600 vec($rin, fileno($fp), 1) = 1;
1588 $ready = select($rin, undef, undef, $time); 1601 ($ready, $time) = select($rin, undef, undef, $time);
1589 1602
1590 $line = ""; 1603 $line = "";
1591 1604
@@ -1891,15 +1904,19 @@ sub get_version {
1891 1904
1892sub start_monitor_and_boot { 1905sub start_monitor_and_boot {
1893 # Make sure the stable kernel has finished booting 1906 # Make sure the stable kernel has finished booting
1894 start_monitor; 1907
1895 wait_for_monitor 5; 1908 # Install bisects, don't need console
1896 end_monitor; 1909 if (defined $console) {
1910 start_monitor;
1911 wait_for_monitor 5;
1912 end_monitor;
1913 }
1897 1914
1898 get_grub_index; 1915 get_grub_index;
1899 get_version; 1916 get_version;
1900 install; 1917 install;
1901 1918
1902 start_monitor; 1919 start_monitor if (defined $console);
1903 return monitor; 1920 return monitor;
1904} 1921}
1905 1922