Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp3877315pxb; Fri, 11 Feb 2022 09:39:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJwLpwzS+pb1eGULKwEjnh8WXtLC4Ne2sgqA4eDzFbBj8S38rad3x6BN6hPD6ZKW1O1hEbvW X-Received: by 2002:a17:90b:354:: with SMTP id fh20mr1495741pjb.134.1644601198998; Fri, 11 Feb 2022 09:39:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644601198; cv=none; d=google.com; s=arc-20160816; b=IzJDjIh8xHaeXziBnN8Yc+n9ApASZCrOWf2GuCKiBt+1eIR42dT8dpG6LtZQkaMEzv QthmasD19kfO1MifZ8dUmUj1uVcr49WDKSdVCYoqjOOx8cEXVgqcZoJNulHcQqNks+i0 FTJZP/qEH6khetogiIc+dLT7i4RcM768phvFOwvzzR0eGveviOPtucIu0DZ9kmu4OB8/ 1vXe+MmeHUFqfMgiRi3A7YFqb/F9FsaiSvNdFXgeu1/o8RpXU5bqaFQU+YN99QWzAor2 3Gk2ARPYhZSvzsHM5KFrAwmaZYCnDM/aa46aT4ySpZtlwuf7ncbRx17CFejGrZj8UYjF SKvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=s7mGcCDwRakb27nJ+hvyeCmB5+buamXTCZy5wLIRtRg=; b=F/Arr8w2EJGjaQ7Jsg2mv4zQhoXIlojTPvRVFEXumbWjrLcUkFndNMl2lgeln1JXfI 5FYbjxxFRdScrM7Ds8WMRIU50PulQhja0tAE6jF0JGSAlGBUnqSOphB4wVe6KgR+xHLE 5rq89P6Owdme99AKxG02bMWRm/tL8v0JnugfuHeWG0wLjSylcaqxGMOBeY9g5HAhs48M S8qicaO46LfvWGKGkOLAmjdEvn/1uVBU6RaunWEcu14BH06hkFNGJaqn8oqMPP2hY/Bk omZKoos6A0X4MiyRTcrIanSBw3FL36t+uwwZLj7YqL+btFQ7vyDOaukE3zTlwGPgN2Ls tr2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=fdomvHt9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e16si5499831plx.445.2022.02.11.09.39.44; Fri, 11 Feb 2022 09:39:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=fdomvHt9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352004AbiBKRNW (ORCPT + 99 others); Fri, 11 Feb 2022 12:13:22 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:36366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351987AbiBKRNT (ORCPT ); Fri, 11 Feb 2022 12:13:19 -0500 Received: from mail-il1-x12d.google.com (mail-il1-x12d.google.com [IPv6:2607:f8b0:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB3792E8 for ; Fri, 11 Feb 2022 09:13:17 -0800 (PST) Received: by mail-il1-x12d.google.com with SMTP id i10so7373932ilm.4 for ; Fri, 11 Feb 2022 09:13:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=s7mGcCDwRakb27nJ+hvyeCmB5+buamXTCZy5wLIRtRg=; b=fdomvHt9zMMnngWxveYBK7C1iFPQy7YFQkSeuwToo7/UZg+ppFxZs0Fw3zN6ixIwaQ VXQnU2ouajTpSQ2eoUlvf6o71S1OtOngn9AI/mJVsIkvRwcTaJ+L2voh+dW10QNq9D9b 8F1hoRb4YxlbTzngZ1UTU8CJDV5l4NpeIjmzU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=s7mGcCDwRakb27nJ+hvyeCmB5+buamXTCZy5wLIRtRg=; b=c/2lb7drZrio9cpEagan8wJUTv2cor5cSU0culdEBSeEu/wY75bfT2wcCnaF78sBxF EkfGHRl8pUOZb4jRNJYFuGDLgHDd0ur2eCqkx+XR+Z1VH/p34FUaic9BueTTsKWM2yUh dJZu5CowFtn78TX//6Vu/hzoMeQYmZpcE/jo4TriKZRPWinHbcVVlLLKI0XV+68HhTDW 3cklsMGt8Fb/onX/qkKloJFod2IfDIxdGX1Soo3TZndHNztxPPRePqtcIl8sYBWmIBOC pdimkgAPIm+/VcDN5/CptpPXiwpSlbXE4LXCvevZgKoZTYS+EkXcjHyUSwan8dM7uz47 3/Qg== X-Gm-Message-State: AOAM5318JP3oOEA2ffFdkLF2Ila6XCKz2u71nLE4LXsm8nUMrcTprCYl DedUzua3TeFn5mJBxvXkJA8mdQ== X-Received: by 2002:a92:1311:: with SMTP id 17mr1371108ilt.42.1644599597132; Fri, 11 Feb 2022 09:13:17 -0800 (PST) Received: from [192.168.1.128] ([71.205.29.0]) by smtp.gmail.com with ESMTPSA id u8sm5050640ilb.39.2022.02.11.09.13.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 11 Feb 2022 09:13:16 -0800 (PST) Subject: Re: [PATCH 1/2] selftests: x86: allow expansion of $(CC) To: David Laight , Muhammad Usama Anjum , Jarkko Sakkinen , Dave Hansen , Shuah Khan , Andy Lutomirski , Borislav Petkov , Jethro Beekman , "open list:INTEL SGX" , "open list:KERNEL SELFTEST FRAMEWORK" , open list Cc: "kernel@collabora.com" , "kernelci@groups.io" , "kernelci.org bot" , Shuah Khan References: <20220210190642.1477814-1-usama.anjum@collabora.com> <20220210190642.1477814-2-usama.anjum@collabora.com> <99625ceecead4e9eb73de2fc8acb2ae9@AcuMS.aculab.com> From: Shuah Khan Message-ID: <7a501981-e4ce-fb08-7c1e-6aca26245cef@linuxfoundation.org> Date: Fri, 11 Feb 2022 10:13:15 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <99625ceecead4e9eb73de2fc8acb2ae9@AcuMS.aculab.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/11/22 9:47 AM, David Laight wrote: > From: Shuah Khan >> Sent: 10 February 2022 20:52 >> >> On 2/10/22 12:06 PM, Muhammad Usama Anjum wrote: >>> CC can have multiple sub-strings like "ccache gcc". Erorr pops up if >>> it is treated as single string and double quote are used around it. >>> This can be fixed by removing the quotes and not treating CC a single >>> string. >>> >>> Fixes: e9886ace222e ("selftests, x86: Rework x86 target architecture detection") >>> Reported-by: "kernelci.org bot" >>> Signed-off-by: Muhammad Usama Anjum >>> --- >>> tools/testing/selftests/x86/check_cc.sh | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/tools/testing/selftests/x86/check_cc.sh b/tools/testing/selftests/x86/check_cc.sh >>> index 3e2089c8cf549..aff2c15018b53 100755 >>> --- a/tools/testing/selftests/x86/check_cc.sh >>> +++ b/tools/testing/selftests/x86/check_cc.sh >>> @@ -7,7 +7,7 @@ CC="$1" >>> TESTPROG="$2" >>> shift 2 >>> >>> -if "$CC" -o /dev/null "$TESTPROG" -O0 "$@" 2>/dev/null; then >>> +if $CC -o /dev/null "$TESTPROG" -O0 "$@" 2>/dev/null; then >>> echo 1 >>> else >>> echo 0 >>> >> >> The intent is testing if $CC is set. Does this change work when >> $CC is not set? > > More by luck than judgement. Before and after. > If $CC might be empty you probably want: > > [ -n "$CC" ] && { echo 0; return; } > > The subject is also wrong. Should be "allow field splitting' of ${CC}. > (no brace or curly braces, not round ones.) > Good points. It would be good enhancement to add the check - since the current logic doesn't handle the null CC thanks, -- Shuah