From: Eugene Syromyatnikov Date: Mon, 22 Aug 2016 08:48:39 +0000 (+0300) Subject: tests: fill old_value argument in timer{,fd}_xettime tests X-Git-Tag: v4.14~181 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bce81639378b455603375f272ddaf46340a1a597;p=strace 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. --- 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 = {