Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp63735yba; Wed, 17 Apr 2019 19:42:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqy1nDVrKsYKRqVEbURGAPIdZuspySGLzJ25j4seNwDIjRKFci5BtFrqL5JDkIXzVy4hwIBK X-Received: by 2002:a62:1249:: with SMTP id a70mr92896477pfj.160.1555555323342; Wed, 17 Apr 2019 19:42:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555555323; cv=none; d=google.com; s=arc-20160816; b=GW5VIno1GxH18DWqkvJBxZyvnuZxtNVsmzYPlLBgswc8Q07gpK4lCmGOLRsGUAdj7+ DAqhJzF5ugxN1WC+j320aozLLMxu8TEM2YPH651qgHgFpsxYNcOSqJFJl9C1CqpTtXUg qlla+kFXHallvWhxa7nj0ons8iE5wTv9gH9pcWVWz4GJ+AYyn/Lltfdc+fMbdIvG1dgX Pj7qSwcSJ9aM56K0briahk6g+m2Kd7eSX42hLR4PIoRif4mxo4W9lZwuT5wmCmF1M4Lx GeHeEmKUtOxgrO5podteqIwU/Oa3+YWLtBcmg9A5O9BiCsVmBgjvkacwzG14ooh48uSS ZuQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=0SBrxW7hSbpwYzvw/i9m3kBM89tMgZmmyL7tAby49x4=; b=NYgDvoN68ekuTRSP+o3Qkz3pPS/CWKU/Z6gTdUbwoDgXS5/L03xVM63FI0FAhp0DBM OLeWIhgv7SuSfN6nwxGPPdzXFa7O5krhjy2xBdNwjblo4tRElbrQDb2Jer1n4G4Pjh9Y QgNJYa1901bMAoYno8WufGr3ukxOcw3LQDTUN4lnh8eaw862NRK8nA8DIFw+syDZggPP aHZDd8YSDU6FSs7M0hoAjvjBawxffXWQmAom3w75IImsXJOVUPOz4EMqZzP64/GjlNDA 0PMIkrxDP/NRGfJlWxz8XpuyjsnGkACnUzUj2ytQiz/TMzBjrqVLBPKzCDiV976aZ3TG MDag== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v32si630541pgl.152.2019.04.17.19.41.47; Wed, 17 Apr 2019 19:42:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387920AbfDRCkv (ORCPT + 99 others); Wed, 17 Apr 2019 22:40:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:55374 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732737AbfDRCkv (ORCPT ); Wed, 17 Apr 2019 22:40:51 -0400 Received: from oasis.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9F53C20821; Thu, 18 Apr 2019 02:40:50 +0000 (UTC) Date: Wed, 17 Apr 2019 22:40:48 -0400 From: Steven Rostedt To: Masayoshi Mizuma Cc: Masayoshi Mizuma , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] ktest: Add support for meta characters in GRUB_MENU Message-ID: <20190417224048.0465b2c1@oasis.local.home> In-Reply-To: <20190417235823.18176-1-msys.mizuma@gmail.com> References: <20190417235823.18176-1-msys.mizuma@gmail.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 17 Apr 2019 19:58:23 -0400 Masayoshi Mizuma wrote: > From: Masayoshi Mizuma > > ktest fails if meta characters are in GRUB_MENU, for example > GRUB_MENU = 'Fedora (test)' > > The failure happens because the meta characters are not escaped, > so the menu doesn't match in any entries in GRUB_FILE. > > Use quotemeta() to escape the meta characters. > > Signed-off-by: Masayoshi Mizuma I applied this patch to my tree but haven't pushed it out. The ktest.pl I use to test my kernels is a soft link to my development tree (where I just added this patch). If it doesn't cause me any issues, I'll push it to linux-next in a week or so and then push it to Linus after that. -- Steve > --- > tools/testing/ktest/ktest.pl | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl > index 87af8a68ab25..fc6140d45280 100755 > --- a/tools/testing/ktest/ktest.pl > +++ b/tools/testing/ktest/ktest.pl > @@ -1866,9 +1866,10 @@ sub get_grub2_index { > or dodie "unable to get $grub_file"; > > my $found = 0; > + my $grub_menu_qt = quotemeta($grub_menu); > > while () { > - if (/^menuentry.*$grub_menu/) { > + if (/^menuentry.*$grub_menu_qt/) { > $grub_number++; > $found = 1; > last; > @@ -1909,9 +1910,10 @@ sub get_grub_index { > or dodie "unable to get menu.lst"; > > my $found = 0; > + my $grub_menu_qt = quotemeta($grub_menu); > > while () { > - if (/^\s*title\s+$grub_menu\s*$/) { > + if (/^\s*title\s+$grub_menu_qt\s*$/) { > $grub_number++; > $found = 1; > last;