Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3168312pxu; Sun, 29 Nov 2020 17:36:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJwYrL7fyQMqyh8ZFA8FxdLl4JufRbY/4Ud4Gu3M1RxXXuSf6ndIk2+F1EkZXs0WMAffE262 X-Received: by 2002:aa7:cad2:: with SMTP id l18mr19096129edt.183.1606700186705; Sun, 29 Nov 2020 17:36:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606700186; cv=none; d=google.com; s=arc-20160816; b=BOYRoqEKe0eGtANZ8BoEaoucNoIxiv4vcWe/bsDTEuRDHlIbff//GR5VPXlZP8Vdie BRn8+g2vdJfDZb/CiPf02AEl9PwrpmpGaTuyLfk76zoJ7ybW84QeNY/jGPEmscpeLNYk MS1NT9stUOcO29GruLVxWBeMkh8CTh+Up5M3wnu9FHFthYMyTaN8upQkZQ5a644bvtcZ XPym0AHCOz6FD39Td4o3hh1goaFQ/oU9VqFBqVRvcEXg6ImSzWHZpPJJv6/N7C5NcJK2 Pll7lDSgHGG84RplStAuT33BrtqoB+xL0qpg8Omuk0sQSdL2WD8ABrl0qWJckZkqRP5J yNDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=79ZPDI9jet3qQx0nLGLby/X6fEkmogOcX+WawS/Znx8=; b=J5C7UsSC5I/d9bADAYbTn538CDEp9jwvuCJ1IFwRcGTiVpFTXvOIrJtVOmULn9kkM2 m53w+pO8x6WwwyHrd9F4sWrXgG0sVvv+q0wSUikz92RcM80VnUpZPHePzsHrQhQY6qzK rBf1/s7dzTaP38ji8M72M3wiyupha/CRJ0kPmnV41BLMm2URApxgJGQSWcxQsC4USojU n4VGIyaWSawf4gELWx9OUnzainoGBWBqxc1EhORjicuKdeEd365YYD66CjGwrU28aTDv 3j/v+GaaQ23G6mhkNVQML0EkSK1wkqOTVtHB+L77DDjw22GwspMXqqlvP5F0jLSirnlO Am9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=iVHdx6Xc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o25si10835652edz.20.2020.11.29.17.36.04; Sun, 29 Nov 2020 17:36:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=iVHdx6Xc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728678AbgK3Bdk (ORCPT + 99 others); Sun, 29 Nov 2020 20:33:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727294AbgK3Bdk (ORCPT ); Sun, 29 Nov 2020 20:33:40 -0500 Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F4DCC0613D3 for ; Sun, 29 Nov 2020 17:33:00 -0800 (PST) Received: by mail-qk1-x741.google.com with SMTP id q5so9527819qkc.12 for ; Sun, 29 Nov 2020 17:33:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=79ZPDI9jet3qQx0nLGLby/X6fEkmogOcX+WawS/Znx8=; b=iVHdx6XcF5BeoqhxM6ZxHHjQxN7AMUe1/MLu1ZM5rWbXU2cE/ZODR+8I7SH4FqG5/M ORE5nQrHihBO6xVwN1N4JXOAwevKvOD/Z8k1eiCAbH99Yz9fTyzg0UUpZFONg01SkN39 VlxniP8OnVeCeDcZnXoFCJzCIl0UqTMS/3nrlzu+zE6jPj0U8FKEZxFYfwCid/RA72vh zBwhgfz/v7ynB3rb31jsj7esBMPscNNkyTi35M7yFEa8B88TOh6ItLERyQ7kq3xEGIKV u6jBCL8YBFxIkSRTW6Db8S2beUA/24zBXz5MIjwavIidcGo5YAWUH7ZprV+q1SctTZj6 DQsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=79ZPDI9jet3qQx0nLGLby/X6fEkmogOcX+WawS/Znx8=; b=ZagS3jWJZAMGH+xLQghw8UzH1KfXeHrxgi0qzKgKYgfyTgjzKbKsJZMYmMWiCW7Pvf tj7EAIy7zFsOGJq97zu2qmQbDeM1g0KEb7UU+YPYeTAyUgrscqHqZvVT5xkBjig43982 hip0PQZ0UupsDrAT92l1QNaU6f7NguC1DfTSKPCSdrjSaRo47AzqooShNS1B4C9h2eM0 A016NYy5NJKpb9dFXc41kYdl9QuJxsxRiJd8hTAX3cPUFF2HETyAD008MM5kPCotNfit q4coFsZcVpJZtYYpM80Qfqf6Hy54QdppN9f0YRDVqykAs9pqlgU+hNyDBE43yMD4UZX2 A/Ng== X-Gm-Message-State: AOAM530d5IBQ/aYuUV+pwGMnD4d+b208l3nNpV5/uuqKCk/z6EUwkinQ ScF2KW9u9OVjpclMsbVUnQ== X-Received: by 2002:ae9:eb10:: with SMTP id b16mr21139219qkg.494.1606699979414; Sun, 29 Nov 2020 17:32:59 -0800 (PST) Received: from gabell (209-6-122-159.s2973.c3-0.arl-cbr1.sbo-arl.ma.cable.rcncustomer.com. [209.6.122.159]) by smtp.gmail.com with ESMTPSA id s12sm13852161qtq.60.2020.11.29.17.32.58 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 29 Nov 2020 17:32:58 -0800 (PST) Date: Sun, 29 Nov 2020 20:32:56 -0500 From: Masayoshi Mizuma To: Libo Chen Cc: linux-kernel@vger.kernel.org, rostedt@goodmis.org, m.mizuma@jp.fujitsu.com Subject: Re: [PATCH 1/1] ktest.pl: Fix incorrect reboot for grub2bls Message-ID: <20201130013256.oryyz4wxd356n74o@gabell> References: <20201121021243.1532477-1-libo.chen@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201121021243.1532477-1-libo.chen@oracle.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 20, 2020 at 06:12:43PM -0800, Libo Chen wrote: > 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. > > Fixes: ac2466456eaa ("ktest: introduce grub2bls REBOOT_TYPE option") > > Signed-off-by: Libo Chen Thank you for the fix! I tested the patch with fedora33. It works well. Please feel free to add: Tested-by: Masayoshi Mizuma Thanks! Masa > --- > tools/testing/ktest/ktest.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > 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"; > -- > 2.27.0 >