Hi All,
Recently, we found the default test case mtest06 failed; the test case
wanted to handle sigal "SIGSEGV", but it only handles when si_code is
"SEGV_MAPERR";
the si_code for SIGSEGV signal has two values: SEGV_MAPERR and SEGV_ACCERR;
static void
sig_handler(int signal, /* signal number, set to handle SIGALRM
*/
siginfo_t *info,
struct ucontext *ut)/* contains pointer to sigcontext
structure */
{
switch (signal)
{
case SIGALRM:
tst_resm(TPASS, "Test ended, success");
_exit(0);
case SIGSEGV:
if (info->si_code == SEGV_MAPERR &&
info->si_addr == map_address)
{
tst_resm(TINFO,
"page fault occurred at %p",
map_address);
longjmp(jmpbuf, 1);
}---------------------------------------------------------------------------------------->>>>>>>
it doesn't handle when si_code is "SEGV_ACCERR", the test exits with -1;
this isn't right; there should be some code to process the SEGV_ACCERR type
sigsegv.
default:
fprintf(stderr, "caught unexpected signal - %d --- exiting\n",
signal);
_exit(-1);
}
}
Please improve the test case for handling sigsegv signal or give advices on
how to improve it;
thanks,
best regards,
renxiu liang
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list