aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-04-29 16:57:29 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-29 16:57:29 -0400
commit5415ba99c229105a6939a7f9effe21045b8b2e5b (patch)
tree6fbf10cfba3e946f8011539408c843c038564e1a
parent9e8529afc4518f4e5d610001545ebc97e1333c79 (diff)
parentdf5f7c66013c46cec9aa8156af257bc5eb29b5c5 (diff)
Merge tag 'ktest-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest
Pull ktest update from Steven Rostedt: "A couple of fixes to handle a config file that tests multiple machines and has conflicts it the grub menus. That is, if the machines use the same grub menu name, but they are at different locations in the menu.lst file" * tag 'ktest-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest: ktest: Reset grub menu cache with different machines ktest: Allow tests to use different GRUB_MENUs
-rwxr-xr-xtools/testing/ktest/ktest.pl14
1 files changed, 12 insertions, 2 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index 4e67d52eb3a2..0d7fd8b51544 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -73,6 +73,7 @@ my $ktest_config;
73my $version; 73my $version;
74my $have_version = 0; 74my $have_version = 0;
75my $machine; 75my $machine;
76my $last_machine;
76my $ssh_user; 77my $ssh_user;
77my $tmpdir; 78my $tmpdir;
78my $builddir; 79my $builddir;
@@ -108,6 +109,7 @@ my $scp_to_target;
108my $scp_to_target_install; 109my $scp_to_target_install;
109my $power_off; 110my $power_off;
110my $grub_menu; 111my $grub_menu;
112my $last_grub_menu;
111my $grub_file; 113my $grub_file;
112my $grub_number; 114my $grub_number;
113my $grub_reboot; 115my $grub_reboot;
@@ -1538,7 +1540,9 @@ sub run_scp_mod {
1538 1540
1539sub get_grub2_index { 1541sub get_grub2_index {
1540 1542
1541 return if (defined($grub_number)); 1543 return if (defined($grub_number) && defined($last_grub_menu) &&
1544 $last_grub_menu eq $grub_menu && defined($last_machine) &&
1545 $last_machine eq $machine);
1542 1546
1543 doprint "Find grub2 menu ... "; 1547 doprint "Find grub2 menu ... ";
1544 $grub_number = -1; 1548 $grub_number = -1;
@@ -1565,6 +1569,8 @@ sub get_grub2_index {
1565 die "Could not find '$grub_menu' in $grub_file on $machine" 1569 die "Could not find '$grub_menu' in $grub_file on $machine"
1566 if (!$found); 1570 if (!$found);
1567 doprint "$grub_number\n"; 1571 doprint "$grub_number\n";
1572 $last_grub_menu = $grub_menu;
1573 $last_machine = $machine;
1568} 1574}
1569 1575
1570sub get_grub_index { 1576sub get_grub_index {
@@ -1577,7 +1583,9 @@ sub get_grub_index {
1577 if ($reboot_type ne "grub") { 1583 if ($reboot_type ne "grub") {
1578 return; 1584 return;
1579 } 1585 }
1580 return if (defined($grub_number)); 1586 return if (defined($grub_number) && defined($last_grub_menu) &&
1587 $last_grub_menu eq $grub_menu && defined($last_machine) &&
1588 $last_machine eq $machine);
1581 1589
1582 doprint "Find grub menu ... "; 1590 doprint "Find grub menu ... ";
1583 $grub_number = -1; 1591 $grub_number = -1;
@@ -1604,6 +1612,8 @@ sub get_grub_index {
1604 die "Could not find '$grub_menu' in /boot/grub/menu on $machine" 1612 die "Could not find '$grub_menu' in /boot/grub/menu on $machine"
1605 if (!$found); 1613 if (!$found);
1606 doprint "$grub_number\n"; 1614 doprint "$grub_number\n";
1615 $last_grub_menu = $grub_menu;
1616 $last_machine = $machine;
1607} 1617}
1608 1618
1609sub wait_for_input 1619sub wait_for_input