From c736b456ad34ef37039f19dee48bc98af5a86d2f Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Sun, 7 Feb 2016 23:46:33 +0000 Subject: [PATCH] tests: extend coverage of time syscall * tests/time.c (main): Check decoding of NULL time_t pointer. --- tests/time.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/time.c b/tests/time.c index f9fde5cb..041b0117 100644 --- a/tests/time.c +++ b/tests/time.c @@ -1,4 +1,6 @@ /* + * This file is part of time strace test. + * * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * @@ -39,11 +41,13 @@ int main(void) { time_t *p = tail_alloc(sizeof(time_t)); - time_t t = syscall(__NR_time, p); + time_t t = syscall(__NR_time, NULL); if ((time_t) -1 == t) perror_msg_and_skip("time"); + printf("time(NULL) = %jd\n", (intmax_t) t); + t = syscall(__NR_time, p); printf("time([%jd]) = %jd\n", (intmax_t) *p, (intmax_t) t); puts("+++ exited with 0 +++"); -- 2.40.0