From: Eugene Syromyatnikov Date: Sun, 23 Apr 2017 19:50:29 +0000 (+0200) Subject: tests: add faulty pointer check to time test X-Git-Tag: v4.17~38 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0399062e41d142a9f3d199bf280e27d7740ef832;p=strace tests: add faulty pointer check to time test * tests/time.c (main): Add check for an inaccessible pointer. --- diff --git a/tests/time.c b/tests/time.c index f9c4830a..fc71619a 100644 --- a/tests/time.c +++ b/tests/time.c @@ -47,6 +47,9 @@ main(void) perror_msg_and_skip("time"); printf("time(NULL) = %jd\n", (intmax_t) t); + t = syscall(__NR_time, p + 1); + printf("time(%p) = %s\n", p + 1, sprintrc(t)); + t = syscall(__NR_time, p); printf("time([%jd]) = %jd\n", (intmax_t) *p, (intmax_t) t);