[LTP] [PATCH v2 08/13] sigwaitinfo01: catch SEGV and report success for bad_address2 testcase

Cyril Hrubis chrubis@suse.cz
Wed Nov 29 16:33:38 CET 2017


Hi!
> > Why don't we just check for WIFSIGNALED() and WTERMSIG() instead?
> >
> > We do not have to install any handler that way...
> 
> I think that is what I tried initially but for the tst_sig() call in
> setup() that installs a default handler and catches the SIGSEGV.

Then just do signal(SIGSEGV, SIGDFL) in the child just before do do the
test. Also it does not make sense to use FORK_OR_VFORK() there because
the thest will not work on uClinux anyway, just use plain old fork()
instead.

> >
> >> +	else
> >> +		tst_resm(TFAIL, "Unrecognised child exit code");
> >>  }
> >>  
> >>  void test_bad_address3(swi_func sigwaitinfo, int signo)
> >> -- 
> >> 2.14.2
> >> 

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list