[LTP] [PATCH] syscalls/waitid10: Fix on ARM, PPC and possibly others

Richard Palethorpe rpalethorpe@suse.de
Thu Mar 31 12:07:43 CEST 2022


Hello,

Martin Doucha <mdoucha@suse.cz> writes:

> On 21. 03. 22 16:48, Richard Palethorpe wrote:
>> I'm wondering if we should branch on the architecture. If it's x86[_64]
>> then we only do divide by zero as it's reasonable to think that if the
>> signal is not raised then this is a bug.
>
> It's more likely to be a hardware bug/missing feature though. Do we
> really care? I'd argue that removing the division altogether and just
> calling raise(SIGFPE) in the child process is all we need in this
> particular test.

I suppose it depends on if there is a substantial difference in how the
signal is raised between div by zero and raise. I guess there is some
configuration to trap the faulting instruction and raise a
signal.

I don't have a strong opinion as, by definintion, testing undefined
behaviour has uncertain results.

-- 
Thank you,
Richard.


More information about the ltp mailing list