]> granicus.if.org Git - strace/commitdiff
tests: fill old_value argument in timer{,fd}_xettime tests
authorEugene Syromyatnikov <evgsyr@gmail.com>
Mon, 22 Aug 2016 08:48:39 +0000 (11:48 +0300)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 22 Aug 2016 09:32:47 +0000 (09:32 +0000)
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
tests/timerfd_xettime.c

index 6fcd00ef6f972991030600c07d2d6c5e17e00252..877f71738807b18c95957fb1b92cb3c0af0fd5ed 100644 (file)
@@ -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 = {
index a084b666150b4384d5c7cc32cf0841f1260a75b7..2742ec2b37ac5b5af7d4661b50d7352c3c6563c1 100644 (file)
@@ -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 = {