Skip to content

Commit b06e15e

Browse files
Muhammad Usama Anjumhansendc
authored andcommitted
selftests/x86: Add validity check and allow field splitting
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: e9886ac ("selftests, x86: Rework x86 target architecture detection") Reported-by: "kernelci.org bot" <bot@kernelci.org> Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Link: https://lkml.kernel.org/r/20220214184109.3739179-2-usama.anjum@collabora.com
1 parent 5626de6 commit b06e15e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tools/testing/selftests/x86/check_cc.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ CC="$1"
77
TESTPROG="$2"
88
shift 2
99

10-
if "$CC" -o /dev/null "$TESTPROG" -O0 "$@" 2>/dev/null; then
10+
if [ -n "$CC" ] && $CC -o /dev/null "$TESTPROG" -O0 "$@" 2>/dev/null; then
1111
echo 1
1212
else
1313
echo 0

0 commit comments

Comments
 (0)