[LTP] [PATCH 1/1] recvmmsg01: Workaround segfault on libc variant on 32 bit
Petr Vorel
pvorel@suse.cz
Mon Nov 11 15:24:37 CET 2024
Hi all,
...
> > +static void test_bad_addr(unsigned int i)
> > +{
> > + struct time64_variants *tv = &variants[tst_variant];
> > + void *timeout = bad_addr;
> > + pid_t pid;
> > + int status;
> > +
> > + pid = SAFE_FORK();
> > + if (!pid) {
> > + verify_recvmmsg(i, timeout);
> > + _exit(!TST_PASS);
> This should be just exit(0). The child should either crash or exit with
> 0 any other result should be considered a bug.
+1
> > + }
> > +
> > + SAFE_WAITPID(pid, &status, 0);
> > +
> > + if (WIFEXITED(status))
> ^
> && !WEXITSTATUS(status))
Ah, good point. I'll send a patch adding this to other tests, where it is
missing.
Merged with these fixes + wording from Wai.
Kind regards,
Petr
More information about the ltp
mailing list