]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Yet another attempt to make the timerfd-syscall test reliable.
authorBart Van Assche <bvanassche@acm.org>
Thu, 17 Mar 2011 07:45:46 +0000 (07:45 +0000)
committerBart Van Assche <bvanassche@acm.org>
Thu, 17 Mar 2011 07:45:46 +0000 (07:45 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11647

memcheck/tests/linux/timerfd-syscall.c
memcheck/tests/linux/timerfd-syscall.stderr.exp

index b11e34eb3e31f614f509773c36bcceb1a325505d..2a2e1e2bcf1cdb20b975c60325a0079325862db8 100644 (file)
@@ -268,8 +268,8 @@ int main(int ac, char **av)
     else
     {
       const double delta = (ttmr - tnow) * 1e-6;
-      if (1.9 < delta && delta < 2.2)
-        fprintf(stderr, "got timer ticks (%ld) after about 2s\n", ticks);
+      if (19 <= ticks && ticks <= 21 && 1.9 < delta && delta < 2.2)
+        fprintf(stderr, "got about 20 timer ticks after about 2s\n", ticks);
       else
         fprintf(stderr, "got timer ticks (%ld) after %.2f s\n", ticks, delta);
     }
index 247ce1f264910f45320c3a1b2b3b6146e5e61cb8..31ffa8468e76fed3a29ec5a4d81345dda79cf84c 100644 (file)
@@ -17,7 +17,7 @@ timerfd_gettime returned:
        it_value = 0.1 it_interval = 0.1
 sleeping 1 second ...
 waiting timer ...
-got timer ticks (20) after about 2s
+got about 20 timer ticks after about 2s
 O_NONBLOCK test ...
 waiting timer (flush the single tick) ...
 got timer ticks (1) after 0.1 s
@@ -40,7 +40,7 @@ timerfd_gettime returned:
        it_value = 0.1 it_interval = 0.1
 sleeping 1 second ...
 waiting timer ...
-got timer ticks (20) after about 2s
+got about 20 timer ticks after about 2s
 O_NONBLOCK test ...
 waiting timer (flush the single tick) ...
 got timer ticks (1) after 0.1 s