From: Dmitry V. Levin Date: Mon, 4 Jan 2016 23:43:09 +0000 (+0000) Subject: tests/times-fail.c: use assert X-Git-Tag: v4.12~763 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f2e29da95fd387d596154cd8bae4038b0e9e7915;p=strace tests/times-fail.c: use assert * tests/times-fail.c (main): Use assert. --- diff --git a/tests/times-fail.c b/tests/times-fail.c index c1a3f7e0..5f5277ca 100644 --- a/tests/times-fail.c +++ b/tests/times-fail.c @@ -1,4 +1,5 @@ #include "tests.h" +#include #include #include #include @@ -6,9 +7,8 @@ int main (void) { - if (syscall(__NR_times, 0x42) != -1) - return 77; - puts("times(0x42) = -1 EFAULT (Bad address)"); + assert(syscall(__NR_times, 0x42) == -1); + printf("times(0x42) = -1 EFAULT (%m)\n"); puts("+++ exited with 0 +++"); return 0;