summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjistone <jistone>2006-10-30 23:06:45 +0000
committerjistone <jistone>2006-10-30 23:06:45 +0000
commit7dd1dbf4b5a6591eebd8b5b9844ee5b31bd4be8c (patch)
tree364d4c39db1b6257b143819808ca21065e0652aa
parent390ab50cdb56d61bb3195edad8721dc3c80fe25e (diff)
downloadsystemtap-steved-7dd1dbf4b5a6591eebd8b5b9844ee5b31bd4be8c.tar.gz
systemtap-steved-7dd1dbf4b5a6591eebd8b5b9844ee5b31bd4be8c.tar.xz
systemtap-steved-7dd1dbf4b5a6591eebd8b5b9844ee5b31bd4be8c.zip
2006-10-30 Josh Stone <joshua.i.stone@intel.com>
* systemtap.base/timers.stp: Fudge the comparison a bit between jiffies(1) and profile to allow for slop between start/end times.
-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)