From bce81639378b455603375f272ddaf46340a1a597 Mon Sep 17 00:00:00 2001 From: Eugene Syromyatnikov Date: Mon, 22 Aug 2016 11:48:39 +0300 Subject: [PATCH] tests: fill old_value argument in timer{,fd}_xettime tests This is needed in order to differentiate it from the value returned by the call. As a consequence, it enables revealing possible bugs in syscall parsers, for example, when the value read on syscall entering and not on syscall exiting, as it was the case with timerfd_settime parser. * tests/timer_xettime.c (main): Fill old.its field with value different from the expected one upon call return. * tests/timerfd_xettime.c: Likewise. --- tests/timer_xettime.c | 4 ++++ tests/timerfd_xettime.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/tests/timer_xettime.c b/tests/timer_xettime.c index 6fcd00ef..877f7173 100644 --- a/tests/timer_xettime.c +++ b/tests/timer_xettime.c @@ -59,6 +59,10 @@ main(void) struct itimerspec its; uint32_t pad[4]; } old = { + .its = { + .it_interval = { 0xdeface5, 0xdeface6 }, + .it_value = { 0xdeface7, 0xdeface8 } + }, .pad = { 0xdeadbeef, 0xbadc0ded, 0xdeadbeef, 0xbadc0ded } }, new = { .its = { diff --git a/tests/timerfd_xettime.c b/tests/timerfd_xettime.c index a084b666..2742ec2b 100644 --- a/tests/timerfd_xettime.c +++ b/tests/timerfd_xettime.c @@ -51,6 +51,10 @@ main(void) struct itimerspec its; uint32_t pad[4]; } old = { + .its = { + .it_interval = { 0xdeface5, 0xdeface6 }, + .it_value = { 0xdeface7, 0xdeface8 } + }, .pad = { 0xdeadbeef, 0xbadc0ded, 0xdeadbeef, 0xbadc0ded } }, new = { .its = { -- 2.40.0