From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 56700C64E90 for ; Mon, 30 Nov 2020 01:33:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1BC112076A for ; Mon, 30 Nov 2020 01:33:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iVHdx6Xc" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728692AbgK3Bdk (ORCPT ); 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-Google-Smtp-Source: ABdhPJxdVcjRAk8wbCP6AkFKa1PnFTXgfj267PSq37MK2njQoF7O1cHAQehTLkg84BOEDKgaeZHOxA== 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 >