2022-02-26 02:15:44

by Andrew Morton

[permalink] [raw]
Subject: Re: [PATCH] selftests, x86: fix how check_cc.sh is being invoked

On Fri, 25 Feb 2022 13:15:43 +0000 Guillaume Tucker <[email protected]> wrote:

> Add quotes around $(CC) when calling check_cc.sh from a Makefile to
> pass the value as a single argument to the script even if it has
> several words such as "ccache gcc". Conversely, remove quotes in
> check_cc.sh when calling $CC to make it a command with potentially
> several arguments again.

This changelog describes the fix, but it fails to describe the problem
which the patch is fixing!

Presumably, we're hitting some form of runtime failure under
undescribed circumstances when running selftests. But that's just me
reverse-engineering the patch description. And me reverse-engineering
stuff is a gloriously unreliable thing. Please spell out the problem.


2022-03-11 22:37:29

by Guillaume Tucker

[permalink] [raw]
Subject: Re: [PATCH] selftests, x86: fix how check_cc.sh is being invoked

On 26/02/2022 01:03, Andrew Morton wrote:
> On Fri, 25 Feb 2022 13:15:43 +0000 Guillaume Tucker <[email protected]> wrote:
>
>> Add quotes around $(CC) when calling check_cc.sh from a Makefile to
>> pass the value as a single argument to the script even if it has
>> several words such as "ccache gcc". Conversely, remove quotes in
>> check_cc.sh when calling $CC to make it a command with potentially
>> several arguments again.
>
> This changelog describes the fix, but it fails to describe the problem
> which the patch is fixing!
>
> Presumably, we're hitting some form of runtime failure under
> undescribed circumstances when running selftests. But that's just me
> reverse-engineering the patch description. And me reverse-engineering
> stuff is a gloriously unreliable thing. Please spell out the problem.

Thanks for the review. I've just sent a v2 which is rebased on
other changes in linux-next and with a reworked commit message
which should hopefully be clearer. The issue was seen when
building some kselftest binaries and $CC is defined with multiple
arguments such as "ccache gcc".

Guillaume