From: Dmitry V. Levin Date: Tue, 17 May 2016 17:18:48 +0000 (+0000) Subject: tests/timer_create.c: robustify against os specific issues X-Git-Tag: v4.12~118 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=81f1b1689acdb6bfad96389d594bbbca31c28cb4;p=strace tests/timer_create.c: robustify against os specific issues * tests/timer_create.c (main): Do not assume any specific error code returned by timer_create, print whatever it is. --- diff --git a/tests/timer_create.c b/tests/timer_create.c index 8f7d5cd8..ff924d3f 100644 --- a/tests/timer_create.c +++ b/tests/timer_create.c @@ -42,7 +42,8 @@ int main(void) { syscall(__NR_timer_create, CLOCK_REALTIME, NULL, NULL); - printf("timer_create(CLOCK_REALTIME, NULL, NULL) = -1 EFAULT (%m)\n"); + printf("timer_create(CLOCK_REALTIME, NULL, NULL) = -1 %s (%m)\n", + errno2name()); int tid[4] = {}; struct_sigevent sev = { @@ -54,10 +55,11 @@ main(void) syscall(__NR_timer_create, CLOCK_REALTIME, &sev, NULL); printf("timer_create(CLOCK_REALTIME, {sigev_value={int=%d, ptr=%#lx}" ", sigev_signo=%u, sigev_notify=%#x /* SIGEV_??? */}" - ", NULL) = -1 EINVAL (%m)\n", + ", NULL) = -1 %s (%m)\n", sev.sigev_value.sival_int, sev.sigev_value.sival_ptr, - sev.sigev_signo, sev.sigev_notify); + sev.sigev_signo, sev.sigev_notify, + errno2name()); sev.sigev_notify = SIGEV_NONE; if (syscall(__NR_timer_create, CLOCK_REALTIME, &sev, &tid[0]))