mirror of https://gitee.com/openkylin/linux.git
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. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQEcBAABAgAGBQJRfneBAAoJEOdOSU1xswtMB/EIAMBKvuyNDUch0ym5d/rKV0Vn okmD8UM0aL/LKkhSHO1LlPusl+3nCF1cW9BNAEZ1b+orP/ipLL971s3tE1pJjfQU mHo8HpfnxrCJweczjWX3XVqtG1WBwMqMOEs1Zfg6ybuN10hVHMwfd5CVWLmRg2mi 3sSaktQnYkFwjcujlbjVFNlenLu5pBXFFy1MdHIR9uZV4GIJM5kNL68+82T4VC6A gQCm40KpyaHzNmsxnVxosKOD2vHOq/OdxLs/J39qvdEO2wZOMAH/YLYOCz+eq1WO tD0cQ3P2IbrDFx7Wm25JMcmM+9GumClIwGF96Q+9WRhEyY3w0j7VNGtsdL1ktSw= =98Xp -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
5415ba99c2
|
@ -73,6 +73,7 @@ my $ktest_config;
|
|||
my $version;
|
||||
my $have_version = 0;
|
||||
my $machine;
|
||||
my $last_machine;
|
||||
my $ssh_user;
|
||||
my $tmpdir;
|
||||
my $builddir;
|
||||
|
@ -108,6 +109,7 @@ my $scp_to_target;
|
|||
my $scp_to_target_install;
|
||||
my $power_off;
|
||||
my $grub_menu;
|
||||
my $last_grub_menu;
|
||||
my $grub_file;
|
||||
my $grub_number;
|
||||
my $grub_reboot;
|
||||
|
@ -1538,7 +1540,9 @@ sub run_scp_mod {
|
|||
|
||||
sub get_grub2_index {
|
||||
|
||||
return if (defined($grub_number));
|
||||
return if (defined($grub_number) && defined($last_grub_menu) &&
|
||||
$last_grub_menu eq $grub_menu && defined($last_machine) &&
|
||||
$last_machine eq $machine);
|
||||
|
||||
doprint "Find grub2 menu ... ";
|
||||
$grub_number = -1;
|
||||
|
@ -1565,6 +1569,8 @@ sub get_grub2_index {
|
|||
die "Could not find '$grub_menu' in $grub_file on $machine"
|
||||
if (!$found);
|
||||
doprint "$grub_number\n";
|
||||
$last_grub_menu = $grub_menu;
|
||||
$last_machine = $machine;
|
||||
}
|
||||
|
||||
sub get_grub_index {
|
||||
|
@ -1577,7 +1583,9 @@ sub get_grub_index {
|
|||
if ($reboot_type ne "grub") {
|
||||
return;
|
||||
}
|
||||
return if (defined($grub_number));
|
||||
return if (defined($grub_number) && defined($last_grub_menu) &&
|
||||
$last_grub_menu eq $grub_menu && defined($last_machine) &&
|
||||
$last_machine eq $machine);
|
||||
|
||||
doprint "Find grub menu ... ";
|
||||
$grub_number = -1;
|
||||
|
@ -1604,6 +1612,8 @@ sub get_grub_index {
|
|||
die "Could not find '$grub_menu' in /boot/grub/menu on $machine"
|
||||
if (!$found);
|
||||
doprint "$grub_number\n";
|
||||
$last_grub_menu = $grub_menu;
|
||||
$last_machine = $machine;
|
||||
}
|
||||
|
||||
sub wait_for_input
|
||||
|
|
Loading…
Reference in New Issue