Re: Test failure in Ubuntu 22.04 and 22.10 (new test)

Subject: Re: Test failure in Ubuntu 22.04 and 22.10 (new test)

Date: Mon, 10 Oct 2022 20:27:15 +0300

To: Michael J Gruber, David Bremner

Cc: notmuch@notmuchmail.org

From: Tomi Ollila


On Thu, Oct 06 2022, Michael J. Gruber wrote:

> Am Do., 6. Okt. 2022 um 18:34 Uhr schrieb David Bremner <david@tethera.net>:
>>
>> Michael J Gruber <michaeljgruber+grubix+git@gmail.com> writes:
>>
>> >
>> > Yes, lto-wrapper calls make.
>> >
>> > Are we compiling test functions on the fly during the test? In that
>> > case we need to make sure that each test depends on the build
>> > products, or else the test helper compilation and its users might run
>> > in parallel ...
>>
>> Yes, we compile C code on the fly during the run of the tests. I'm not
>> really clear on what race condition you are anticipating, as neither the
>> compilation nor the other parts of the test are directly run by make.
>> Execution is sequential within each T*.sh file. Unless gcc is returning
>> before it has finished compilation (which I think we'd all agree would
>> be gcc bug), I don't see how a race can arise there. One thing I can
>> imagine happening is gcc's recursive invocation of make somehow fails
>> under make -j, possibly something to do with violated assumptions about
>> the jobserver and/or environment variables.
>
> What I mean is:
> make calls T*.sh
> T*.sh calls gcc
> gcc calls make (for lto)
>
> Could it be that within a parallel make session, that gcc-make-call
> gets delegated to the master make jobserver and thus gcc returns too
> early? Wild speculation, I admit.

Like David said, that would be bug in gcc... (nasty one I'd admit, how
can one expect that the world around has set make to run its jobs
parallely (if that is the case))

anyway, one could try unset MAKEFLAGS in ... test-lib.sh and see
if that helps (perhaps also MFLAGS))

$ printf %s\\n all: $'\tenv' | make -j -f /dev/stdin | sort | grep FLA
MAKEFLAGS= -j4 --jobserver-auth=4,5
MFLAGS=-j4 --jobserver-auth=4,5

> I haven't checked the code, but having those testhelpers as
> prerequisites of the test scripts may help in that case.
>
> Michael

Tomi
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: