Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5590970pxb; Mon, 14 Feb 2022 02:52:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJx9LhSNhoM3kLt8f+zm/nFpFG2+wdCKHDsrY6HR+OAVJTHz366AxnqIKNGrynWKH21g+zYf X-Received: by 2002:a05:6a00:22cb:: with SMTP id f11mr13698575pfj.75.1644835966430; Mon, 14 Feb 2022 02:52:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644835966; cv=none; d=google.com; s=arc-20160816; b=hKXTUxUj2xMoNXcqZrJAGq5LplBuBGEtPQR8AFc+49ba02QUpFOWnLqZ4V3ZApD4Xs 9LQAy8Yr1jxihGcScPxjFoAfsZR8Ui9uvEDToN6cpITokZaqrnetuzn65sGg5RFnXRUA lLlrqtE4+UxWdO7ait9Y2qiPFfZBYV1Vz9bD4oJDMdjXXDfM+m7SVhNOLRNs2x8nzyn0 LsmA0J32eNA5vbOCUJAMBUg3/f362zNeeMFsr2flj4Xx0kviMOXmOBOXv673JZQ3bgIb cY92cnVb+sxCSRWg/8RitStMuVGqyIMQpH+0oCNhQQYpYbzQh7jZqH4B0bUkOZNmiwKG 2ksg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:cc:user-agent:mime-version :date:message-id:dkim-signature; bh=qMMmeMPtPoaP146D82RiPBK/G+wSw7cwr3BhrkWDuN4=; b=GkiWBNoncVv7UVwa3vQYwdiGXx0TcmgfA2Gr4qguQqcDAecAvZgtnun5NqkarC0GUx OzBK+Lsy/U7v+HRWk1hr5sKuGH0ri+DSy3diS41s2qlU76x+94V8jMjR4iVM629H7IpH Ae3g3lS/s3l3rhIFt7IBXCM/6iARKoxpAdahNqe/avef6ZRnUGslOjOJvjB33Z7QUixX jZUENr4JWAtyWjeYNX4xfJOfQ9XhavRhfuLXYJB0pS1DVJleEex75q89NEHHPTkX+cMp UaTxMwCqrnSSPHvF+I9i9wUsG1mE/o/WslBWBrPUzQXlfcVqHeYHscpUdEFgf8VOX3QX /aJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=LEJloTnu; 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=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f21si33257272pfe.317.2022.02.14.02.52.32; Mon, 14 Feb 2022 02:52:46 -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=@collabora.com header.s=mail header.b=LEJloTnu; 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=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239791AbiBNITG (ORCPT + 99 others); Mon, 14 Feb 2022 03:19:06 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:47296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232671AbiBNITC (ORCPT ); Mon, 14 Feb 2022 03:19:02 -0500 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B42EA25C40; Mon, 14 Feb 2022 00:18:54 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: usama.anjum) with ESMTPSA id BBEB11F43333 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1644826733; bh=DGeNZvAkAxc84jyqOMSeG0plMeoRslPbkBa/UawJm90=; h=Date:Cc:Subject:To:References:From:In-Reply-To:From; b=LEJloTnuoTb17lj2/3q1rVL+T9coa2HajJg0FPD5cgCEypg5bBOQtpy1fGbB5q3lz Kgnl3cw0Wpd9rALgRVsLCECWyAMs/4jda2QzUH2RcW/e5O2T1oM2fxlmxf4sIFbPLs 6NOgs6btI2asoBA4PQ4T4Av4GysrFK1VAXm5XmZfzXqgJdkTvEXkj7R42vi30sVNyt wgouBW5vRkTgYurBvcuH2b8rkc4JfdEDQFBcUBzbo3sJKhUTB1ndxuABjxgV7seSXY W0MQ6JQfgFi+JzckRLG694Hzvu1X54+3zblzEBguM0gmFphtL6T9j7S55fiHhJRSoR pMiiUJ/ty/0iQ== Message-ID: <5af77f27-447c-794c-c96f-212dda3e4ab9@collabora.com> Date: Mon, 14 Feb 2022 13:18:43 +0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Cc: usama.anjum@collabora.com, "kernel@collabora.com" , "kernelci@groups.io" , "kernelci.org bot" Subject: Re: [PATCH 1/2] selftests: x86: allow expansion of $(CC) Content-Language: en-US To: Shuah Khan , David Laight , Jarkko Sakkinen , Dave Hansen , Shuah Khan , Andy Lutomirski , Borislav Petkov , Jethro Beekman , "open list:INTEL SGX" , "open list:KERNEL SELFTEST FRAMEWORK" , open list References: <20220210190642.1477814-1-usama.anjum@collabora.com> <20220210190642.1477814-2-usama.anjum@collabora.com> <99625ceecead4e9eb73de2fc8acb2ae9@AcuMS.aculab.com> <7a501981-e4ce-fb08-7c1e-6aca26245cef@linuxfoundation.org> From: Muhammad Usama Anjum In-Reply-To: <7a501981-e4ce-fb08-7c1e-6aca26245cef@linuxfoundation.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SCC_BODY_URI_ONLY, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=no 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 10:13 PM, Shuah Khan wrote: > 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 > I'll send a V2. > thanks, > -- Shuah