mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Libo Chen <libo.chen@oracle.com>,
	Masayoshi Mizuma <msys.mizuma@gmail.com>
Subject: [GIT PULL] ktest.pl: Fix incorrect reboot for grub2bls
Date: Thu, 10 Dec 2020 19:50:09 -0500	[thread overview]
Message-ID: <20201210195009.2a06b3ef@oasis.local.home> (raw)

Linus,

Fix issues with grub2bls in ktest.pl

ktest.pl does not know about grub2bls that was introduced in Fedora 30,
and now it does.


Please pull the latest ktest-v5.10-rc6 tree, which can be found at:


  git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest.git
ktest-v5.10-rc6

Tag SHA1: 5df55c97b33392ad11775afce8d327736de49fba
Head SHA1: 271e0c9dce1b02a825b3cc1a7aa1fab7c381d44b


Libo Chen (1):
      ktest.pl: Fix incorrect reboot for grub2bls

----
 tools/testing/ktest/ktest.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---------------------------
commit 271e0c9dce1b02a825b3cc1a7aa1fab7c381d44b
Author: Libo Chen <libo.chen@oracle.com>
Date:   Fri Nov 20 18:12:43 2020 -0800

    ktest.pl: Fix incorrect reboot for grub2bls
    
    This issue was first noticed when I was testing different kernels on
    Oracle Linux 8 which as Fedora 30+ adopts BLS as default. Even though a
    kernel entry was added successfully and the index of that kernel entry was
    retrieved correctly, ktest still wouldn't reboot the system into
    user-specified kernel.
    
    The bug was spotted in subroutine reboot_to where the if-statement never
    checks for REBOOT_TYPE "grub2bls", therefore the desired entry will not be
    set for the next boot.
    
    Add a check for "grub2bls" so that $grub_reboot $grub_number can
    be run before a reboot if REBOOT_TYPE is "grub2bls" then we can boot to
    the correct kernel.
    
    Link: https://lkml.kernel.org/r/20201121021243.1532477-1-libo.chen@oracle.com
    
    Cc: stable@vger.kernel.org
    Fixes: ac2466456eaa ("ktest: introduce grub2bls REBOOT_TYPE option")
    Signed-off-by: Libo Chen <libo.chen@oracle.com>
    Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index cb16d2aac51c..54188ee16c48 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -2040,7 +2040,7 @@ sub reboot_to {
 
     if ($reboot_type eq "grub") {
 	run_ssh "'(echo \"savedefault --default=$grub_number --once\" | grub --batch)'";
-    } elsif ($reboot_type eq "grub2") {
+    } elsif (($reboot_type eq "grub2") or ($reboot_type eq "grub2bls")) {
 	run_ssh "$grub_reboot $grub_number";
     } elsif ($reboot_type eq "syslinux") {
 	run_ssh "$syslinux --once \\\"$syslinux_label\\\" $syslinux_path";

             reply	other threads:[~2020-12-11  0:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-11  0:50 Steven Rostedt [this message]
2020-12-11  0:57 ` pr-tracker-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201210195009.2a06b3ef@oasis.local.home \
    --to=rostedt@goodmis.org \
    --cc=libo.chen@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=msys.mizuma@gmail.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®