tests/restart_syscall: add a workaround for old arm kernels
As arm kernels used to overwrite ARM_r0 with -EINTR after ERESTART_RESTARTBLOCK, update regexp to workaround this. * tests/restart_syscall.c (main) [__arm__]: Add 0xfffffffc as a valid alternative value for the first argument of restarted nanosleep syscall.
This commit is contained in:
parent
2c2f663584
commit
703a7166ae
@ -64,8 +64,15 @@ main(void)
|
||||
(intmax_t) req.tv_sec, (intmax_t) req.tv_nsec,
|
||||
(intmax_t) rem.tv_sec, (intmax_t) rem.tv_nsec);
|
||||
puts("--- SIGALRM \\{si_signo=SIGALRM, si_code=SI_KERNEL\\} ---");
|
||||
printf("(nanosleep\\(\\{%jd, %jd\\}, %p|restart_syscall\\(<\\.\\.\\."
|
||||
#ifdef __arm__
|
||||
/* old kernels used to overwrite ARM_r0 with -EINTR */
|
||||
# define ALTERNATIVE_NANOSLEEP_REQ "0xfffffffc|"
|
||||
#else
|
||||
# define ALTERNATIVE_NANOSLEEP_REQ ""
|
||||
#endif
|
||||
printf("(nanosleep\\((%s\\{%jd, %jd\\}), %p|restart_syscall\\(<\\.\\.\\."
|
||||
" resuming interrupted nanosleep \\.\\.\\.>)\\) = 0\n",
|
||||
ALTERNATIVE_NANOSLEEP_REQ,
|
||||
(intmax_t) req.tv_sec, (intmax_t) req.tv_nsec, &rem);
|
||||
|
||||
puts("\\+\\+\\+ exited with 0 \\+\\+\\+");
|
||||
|
Loading…
Reference in New Issue
Block a user