selftests/powerpc: Abort load_unaligned_zeropad on unhandled SEGV
If the load unaligned zeropad test takes a SEGV which can't be handled, we increment segv_error, print the offending NIP and then return without taking any further action. In almost all cases this means we'll just take the SEGV again, and loop eternally spamming the console. Instead just abort(), it's a fatal error in the test. The test harness will notice that the child died and print a nice message for us. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
parent
9f751b82b4
commit
06236f4efb
|
@ -73,7 +73,6 @@ extern char __stop___ex_table[];
|
||||||
#error implement UCONTEXT_NIA
|
#error implement UCONTEXT_NIA
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int segv_error;
|
|
||||||
|
|
||||||
static void segv_handler(int signr, siginfo_t *info, void *ptr)
|
static void segv_handler(int signr, siginfo_t *info, void *ptr)
|
||||||
{
|
{
|
||||||
|
@ -95,7 +94,7 @@ static void segv_handler(int signr, siginfo_t *info, void *ptr)
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("No exception table match for NIA %lx ADDR %lx\n", *ip, addr);
|
printf("No exception table match for NIA %lx ADDR %lx\n", *ip, addr);
|
||||||
segv_error++;
|
abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setup_segv_handler(void)
|
static void setup_segv_handler(void)
|
||||||
|
@ -145,8 +144,6 @@ static int test_body(void)
|
||||||
for (i = 0; i < page_size; i++)
|
for (i = 0; i < page_size; i++)
|
||||||
FAIL_IF(do_one_test(mem_region+i, i));
|
FAIL_IF(do_one_test(mem_region+i, i));
|
||||||
|
|
||||||
FAIL_IF(segv_error);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue