From patchwork Thu Feb 10 19:06:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muhammad Usama Anjum X-Patchwork-Id: 12742316 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8E2EAC433F5 for ; Thu, 10 Feb 2022 19:08:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343652AbiBJTII (ORCPT ); Thu, 10 Feb 2022 14:08:08 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:46866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236382AbiBJTIH (ORCPT ); Thu, 10 Feb 2022 14:08:07 -0500 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68F5910C2; Thu, 10 Feb 2022 11:08:08 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: usama.anjum) with ESMTPSA id C36A81F4676E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1644520078; bh=0jYGpXD6Jqyxvu0gUaOrjVAD3YdDmEptoto1aYaXkx4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BN2I87IFqIlmzuZQ9OgfAua3tk7cvmzg6kPr/iGhmd2PCTT5IlEK6dztVZIhezLD4 3WyDMRomVZar+N2tWODVT57JL6onXu7UD70VCXwygCA3nUIOH4bDRlvpRP5nT5mYoW trR/KdhjCdonotJWSA59R2C8ZQ2RD1ohbU2sWVNHuk3rVAUxXKL91pP8wWh6D3X69a N/jk5E1OGqcogkV72MXj79i79HKdT2GHUSZirSjE/PJ4fY2I9RUb5SKh8AWNAzJuPj eeGI29ugeLl8mgLRAaBITV8CbnMDxrPQQItFWjcCgI7bgHic1xmejv3QeO6j3dxatm JugxnpvjGWi1w== From: Muhammad Usama Anjum To: Jarkko Sakkinen , Dave Hansen , Shuah Khan , Andy Lutomirski , Borislav Petkov , Jethro Beekman , linux-sgx@vger.kernel.org (open list:INTEL SGX), linux-kselftest@vger.kernel.org (open list:KERNEL SELFTEST FRAMEWORK), linux-kernel@vger.kernel.org (open list) Cc: Muhammad Usama Anjum , kernel@collabora.com, kernelci@groups.io, "kernelci.org bot" Subject: [PATCH 1/2] selftests: x86: allow expansion of $(CC) Date: Fri, 11 Feb 2022 00:06:40 +0500 Message-Id: <20220210190642.1477814-2-usama.anjum@collabora.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220210190642.1477814-1-usama.anjum@collabora.com> References: <20220210190642.1477814-1-usama.anjum@collabora.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org 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 From patchwork Thu Feb 10 19:06:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muhammad Usama Anjum X-Patchwork-Id: 12742317 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AF8BCC433EF for ; Thu, 10 Feb 2022 19:08:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343686AbiBJTIM (ORCPT ); Thu, 10 Feb 2022 14:08:12 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:46914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236382AbiBJTIL (ORCPT ); Thu, 10 Feb 2022 14:08:11 -0500 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DEC310C2; Thu, 10 Feb 2022 11:08:12 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: usama.anjum) with ESMTPSA id B11E41F4676F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1644520090; bh=w9UAj95XKnPRibc1brD+qtkacXLhUZfQCGbpzMCMPok=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GYZY6rCWfCZBE+0886mH7m5RHGsBgmuNXnM5VnWqvgNdLQDcK5h3uxUfaAcVH6QjD C+mNZVYBuHH/xWOccwOZl6OoQc6yUo/rkR7UbBEEKrZ6rr5QU8QKfTsXmzXvJqhf9l 28yi9/hrMIhV7BPMCUOiNGHA0yK0Bpl1OClyRGAK1D9l84LEXzuIoPOcsZvutxRvcU Fss8S0OzQYcMYB5S8+PL7l3BTJ7NMzdoMRyjygJc20jiycTb0Mui8qcVkTU/SlvxWv 7UbJA1Zo9oyDQLyyZNuIXX6L1wTGc2E6s0RwKWzQnsvMso98hAl84AaFqXZbUV+3+i 7a2kOqE6x86jw== From: Muhammad Usama Anjum To: Jarkko Sakkinen , Dave Hansen , Shuah Khan , Andy Lutomirski , Borislav Petkov , Jethro Beekman , linux-sgx@vger.kernel.org (open list:INTEL SGX), linux-kselftest@vger.kernel.org (open list:KERNEL SELFTEST FRAMEWORK), linux-kernel@vger.kernel.org (open list) Cc: Muhammad Usama Anjum , kernel@collabora.com, kernelci@groups.io, "kernelci.org bot" Subject: [PATCH 2/2] selftests: sgx: Treat CC as one argument Date: Fri, 11 Feb 2022 00:06:41 +0500 Message-Id: <20220210190642.1477814-3-usama.anjum@collabora.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220210190642.1477814-1-usama.anjum@collabora.com> References: <20220210190642.1477814-1-usama.anjum@collabora.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org CC can have multiple sub-strings like "ccache gcc". For check_cc.sh, CC needs to be treated like one argument. Put double quotes around it to make CC one string and hence one argument. Fixes: 2adcba79e69d ("selftests/x86: Add a selftest for SGX") Reported-by: "kernelci.org bot" Signed-off-by: Muhammad Usama Anjum Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen --- tools/testing/selftests/sgx/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/sgx/Makefile b/tools/testing/selftests/sgx/Makefile index 2956584e1e37f..75af864e07b65 100644 --- a/tools/testing/selftests/sgx/Makefile +++ b/tools/testing/selftests/sgx/Makefile @@ -4,7 +4,7 @@ include ../lib.mk .PHONY: all clean -CAN_BUILD_X86_64 := $(shell ../x86/check_cc.sh $(CC) \ +CAN_BUILD_X86_64 := $(shell ../x86/check_cc.sh "$(CC)" \ ../x86/trivial_64bit_program.c) ifndef OBJCOPY