Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp6024773pxb; Mon, 14 Feb 2022 13:23:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJy5DKaemzX4PYkiEjp94axvPgban2aJ8RATJwmn/zGhVPQRZy8lo3C3CBU3GSsWphAZ4jSn X-Received: by 2002:a17:902:f691:: with SMTP id l17mr838018plg.72.1644873783116; Mon, 14 Feb 2022 13:23:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644873783; cv=none; d=google.com; s=arc-20160816; b=IVE4ZPY9VLkOrk/tMUyDJZcjwl+POMxwpHNUazT4wFCj6+4fSMmn2m1JB7mZ6F4jfv KpY9ey4cB3XXLrNK41DFLIm+feExdCKMEAcxDI9vlGYLqHeigy2wLzwfMuMzAJbsdlU6 uyVNdzJPDaIqFFAwvAK+OL5l3D3d1UCxsf7JBt+aWk9ph2KbUGYv07PJ1wyJ6yDTv/R2 Rgu09BENApvohsJpUfUdymn7s6CPj7cR9qAqXVJ6pWJceRgiPPOEMvHBjwGKz3Oq7Omf Tromn3f2DUWC3zfKvViKrEwQpOSP8M6KwFy121jNeQp+kw+7QdG4oe9g/VRUK5bWNdT7 z9og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=V0OExs0cGp1tfemlPWNW4tMXE5Q4wOEmvxxlN0Rs5gg=; b=a6/SpYpBfrrUaQaIOHdiuBa6CaBi/0PvkvsgqroZ4CcsgXKybdWnxZHtT4VBXokWlu 0/YTLmCpDElKNprevoXUyKj20b8Oeu48Zg10yWFgC/mGVffZVdxRMtfxFz+lf3QtoHBC cFLoW4KROzGvaThzcR1dQsTTMPF24u3CzCbHiMlmatrLnyEtN+FkVHeYa9HahiaQc1AI Hka4RamDrpuZvMwgk0NnVAhzVp8j6vzWJO/yugbr+j6zLSePPIENbcQWbFkIDp4nIfy5 2uSqo0+nNnDwMlYaFh3ls8Jx42+w3ZZLqClBlVS/5VnBjboLR/8mD56AWL8BkSacZEv1 soUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=LkKqKFca; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id e8si768590pgn.715.2022.02.14.13.23.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Feb 2022 13:23:03 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=LkKqKFca; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 635291AF52A; Mon, 14 Feb 2022 12:39:36 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235567AbiBNSmo (ORCPT + 99 others); Mon, 14 Feb 2022 13:42:44 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:55126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229929AbiBNSmn (ORCPT ); Mon, 14 Feb 2022 13:42:43 -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 F1E436A031; Mon, 14 Feb 2022 10:42:28 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: usama.anjum) with ESMTPSA id AF6DE1F42D82 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1644864136; bh=W18enxGJ7VHuEUchE3vYqlXRqDM4/g7XY+m9I18XfPg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LkKqKFcaHOg7C4Karxg401kK87AQY/38ozh/h9jHvk0jNc7Y2oI7pYA6hBgUXUafy ur15SFp9BoTv+/nEHm3xXa+hoEFE5IXXw2kii1GMakOOsLXaN2khUmnyeQXvgtkDUe w+lpuqmnfM++Mnu5T3EcNsW9GybJoxWFclWLgfyW2HxC6vGPSFSvJRELnQhxlaEDzQ WaqoWQWBSJ+BN5qSm7mRTQWS2cDZek3jSH5oiIeoNQBrU3jtxvUOIkbeAQ2hYhtHB7 vdQC9xH2FXs5eW+DQAeLz2xBmRYOXdOjaV4episs7eO+X4y0BUe26DuHPcP3xYgJ4A AMuiY8W7K74hA== From: Muhammad Usama Anjum To: Jarkko Sakkinen , Dave Hansen , Shuah Khan , Andy Lutomirski , Jethro Beekman , Borislav Petkov , 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), David.Laight@ACULAB.COM Cc: Muhammad Usama Anjum , kernel@collabora.com, kernelci@groups.io, "kernelci.org bot" Subject: [PATCH V2 1/2] selftests: x86: add validity check and allow field splitting Date: Mon, 14 Feb 2022 23:41:08 +0500 Message-Id: <20220214184109.3739179-2-usama.anjum@collabora.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220214184109.3739179-1-usama.anjum@collabora.com> References: <20220214184109.3739179-1-usama.anjum@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,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 Add check to test if CC has a string. CC can have multiple sub-strings like "ccache gcc". Erorr pops up if it is treated as single string and double quotes are used around it. This can be fixed by removing the quotes and not treating CC as a single string. Fixes: e9886ace222e ("selftests, x86: Rework x86 target architecture detection") Reported-by: "kernelci.org bot" Signed-off-by: Muhammad Usama Anjum --- Changes in V2: Update if condition to check if CC has a string --- 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..8c669c0d662ee 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 [ -n "$CC" ] && $CC -o /dev/null "$TESTPROG" -O0 "$@" 2>/dev/null; then echo 1 else echo 0 -- 2.30.2