From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by mx.groups.io with SMTP id smtpd.web12.18092.1666609594607140953 for ; Mon, 24 Oct 2022 04:06:34 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=elq5uznj; spf=pass (domain: kernel.org, ip: 145.40.68.75, mailfrom: ardb@kernel.org) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 49A41B80DB5 for ; Mon, 24 Oct 2022 11:06:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EE5CAC433D7 for ; Mon, 24 Oct 2022 11:06:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666609591; bh=PrfEW4eS5beAtVbaJGLHfq5C41NQaLHfuIy+NAkYdAk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=elq5uznjhPBGvTAPxn9WDz+w+BqqgOJkOLv+N+lJCZ00Gow8bk345EvEntOQqsUh5 Q8EQWZeul04lKXazg4El4UsV3h0bdzEJaKecRKBELBKgvznXr2tH3FN/pbeR8MGG81 kr7LJnc+ofSJhEAkLv9u9cL6HWPswLSmN8xFXOhSANAkDZ+Go3CWpSuhNMnMXdsgAh REYid6lV9PVA8iZ91z6+6Rz6nb+ST2wB0KvSkYbiiOuVYKpDyvWZSw3gFuCGcvM4+K 0Fpzi3KUhEj6KM0VC8ZqnD6UADlDyEEWSVM8StuhxnVjr1oyP1VA2QtpA6PcDgPQZU 0p2ztzI94dCfA== Received: by mail-lf1-f45.google.com with SMTP id be13so16094963lfb.4 for ; Mon, 24 Oct 2022 04:06:30 -0700 (PDT) X-Gm-Message-State: ACrzQf333ThhgKp1cTscUBCkOnB3cV1OEhiRDpuadgl67jAaiHylOSGh 5jC4cxHpwo0xg93ahkXx1PfYeGlNeVLPESJ8kok= X-Google-Smtp-Source: AMsMyM5oBKh8onQIn+95UzwuHk4Ae6TUQ4zdjtzhrT8qq7AdVOUXnLEmgjHJsS7dWsqif5LYoCHh3iEcf+vhhqp85p8= X-Received: by 2002:a19:c20b:0:b0:4a2:40e5:78b1 with SMTP id l11-20020a19c20b000000b004a240e578b1mr11364767lfc.228.1666609588916; Mon, 24 Oct 2022 04:06:28 -0700 (PDT) MIME-Version: 1.0 References: <20221024061633.105276-1-ardb@kernel.org> In-Reply-To: <20221024061633.105276-1-ardb@kernel.org> From: "Ard Biesheuvel" Date: Mon, 24 Oct 2022 13:06:17 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] BaseTools/Tests: Use quotes around PYTHON_COMMAND To: devel@edk2.groups.io, gaoliming@byosoft.com.cn, bob.c.feng@intel.com Cc: quic_llindhol@quicinc.com, rebecca@bsdio.com Content-Type: text/plain; charset="UTF-8" Liming, Bob: could i get an ack on this please? Our CI is currently broken due to this issue. On Mon, 24 Oct 2022 at 08:16, Ard Biesheuvel wrote: > > Commit ("2355f0c09c52 BaseTools: Fix check for ${PYTHON_COMMAND} in > Tests/GNUmakefile") fixed a latent issue in the BaseTools/Tests > Makefile, but inadvertently broke the BaseTools build for cases where > PYTHON_COMMAND is not set. As it turns out, running 'command' without a > command argument makes the invocation succeed, causing the empty > variable to be evaluated and called later. > > Let's put double quotes around PYTHON_COMMAND in the invocation of > 'command' and force it to fail when PYTHON_COMMAND is not set. > > Signed-off-by: Ard Biesheuvel > --- > BaseTools/Tests/GNUmakefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/BaseTools/Tests/GNUmakefile b/BaseTools/Tests/GNUmakefile > index caa4d26c9ba6..20b387864f74 100644 > --- a/BaseTools/Tests/GNUmakefile > +++ b/BaseTools/Tests/GNUmakefile > @@ -8,7 +8,7 @@ > all: test > > test: > - @if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then ${PYTHON_COMMAND} RunTests.py; else python RunTests.py; fi > + @if command -v "${PYTHON_COMMAND}" >/dev/null 2>&1; then ${PYTHON_COMMAND} RunTests.py; else python RunTests.py; fi > > clean: > find . -name '*.pyc' -exec rm '{}' ';' > -- > 2.35.1 >