[LTP] [PATCH 11/18] sigwaitinfo: catch SEGV and report success for bad_address2 testcase

Cyril Hrubis chrubis@suse.cz
Tue Oct 31 13:12:57 CET 2017


Hi!
> The bad_address2 testcase passes (void *)1 as a sigset pointer to the
> sigwaitinfo syscall. Unsurprisingly, this segfaults in libc rather than
> returning -1 (errno = EFAULT) as LTP expects.
> 
> This patch registers a SIGSEGV handler to catch any SEGV's generated by
> the sigwaitinfo syscall and treat them as success.

Can we, pretty please, rather run the test in a child process and catch
the SEGFAULT using the waitpid()?

The whole longjmp() stuff is overcomplicated solution for the problem.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list