[PATCH v3 3/4] kselftest/arm64: Add tests for SVE vector configuration

Mark Brown broonie at kernel.org
Mon Aug 2 04:33:30 PDT 2021


On Mon, Aug 02, 2021 at 11:25:29AM +0100, Dave Martin wrote:

> That's a reasonable position, but thinking about it a bit more, there's
> not really any loop at all here.
> 
> There definitely is an unwaited-for child and we don't pass WHONANG to
> wait(), so it will either return the child pid, or fail.
> 
> Without WUNTRACED or similar, the child must terminate to wake up the
> wait().

> So is this just a matter of

> 	pid = wait(&ret);
> 	if (pid == -1) {
> 		/* barf */
> 	}
> 	assert(pid == child);
> 
> 	if (!WIFEXITED(ret)) {
> 		/* barf */
> 	}
> 
> 	if (WEXITSTATUS(ret) != 0) {
> 		/* barf */
> 	}
> 
> 	/* parse child's stdout etc. */

That really doesn't seem like a good idea - it's just asking for
fragility if a signal gets delivered to the parent process or something.
Even if almost all the time there will only be one trip through the loop
we should still have the loop there for those few cases where it
triggers.

> 
> > Please delete unneeded context from mails when replying.  Doing this
> > makes it much easier to find your reply in the message, helping ensure
> > it won't be missed by people scrolling through the irrelevant quoted
> > material.
> 
> Hmmm, usually I at least try to do that, but I did seem to leave rather
> a lot of trailing junk that time.
> 
> (Working out which context is relevant is not always an exact science,
> but in this case, it looks like I just forgot.)
> 
> Cheers
> ---Dave 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210802/958ef258/attachment.sig>


More information about the linux-arm-kernel mailing list