summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testsuite/ChangeLog2
-rw-r--r--testsuite/systemtap.base/timers.stp3
2 files changed, 4 insertions, 1 deletions
diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog
index 019224e8..93d82e7a 100644
--- a/testsuite/ChangeLog
+++ b/testsuite/ChangeLog
@@ -4,6 +4,8 @@
kernel.function("scheduler_tick") instead of timer.jiffies
so the test works on all kernels. The test needs a probe
that is invoked often on all cpus.
+ * systemtap.base/timers.stp: Fudge the comparison a bit between
+ jiffies(1) and profile to allow for slop between start/end times.
2006-10-30 Martin Hunt <hunt@redhat.com>
diff --git a/testsuite/systemtap.base/timers.stp b/testsuite/systemtap.base/timers.stp
index 8b990aab..fb590edc 100644
--- a/testsuite/systemtap.base/timers.stp
+++ b/testsuite/systemtap.base/timers.stp
@@ -38,7 +38,8 @@ probe end
/* profile counter should be non-zero, and at
* least as many as the jiffies(1) counter */
- if ((p > 0) && (p >= j1)) {
+ /* (fudge comparison by ~1% since start & end aren't synchronized) */
+ if ((p > 0) && (p*100 >= j1*99)) {
printf("systemtap test success\n")
} else {
printf("unexpected profile count: %d profiles and %d jiffies\n", p, j1)