Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: e9886ace222e ("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

authored by

Muhammad Usama Anjum and committed by
Dave Hansen
b06e15eb 5626de65

+1 -1
+1 -1
tools/testing/selftests/x86/check_cc.sh
··· 7 7 TESTPROG="$2" 8 8 shift 2 9 9 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 11 11 echo 1 12 12 else 13 13 echo 0