From 7dd1dbf4b5a6591eebd8b5b9844ee5b31bd4be8c Mon Sep 17 00:00:00 2001 From: jistone Date: Mon, 30 Oct 2006 23:06:45 +0000 Subject: 2006-10-30 Josh Stone * systemtap.base/timers.stp: Fudge the comparison a bit between jiffies(1) and profile to allow for slop between start/end times. --- testsuite/ChangeLog | 2 ++ testsuite/systemtap.base/timers.stp | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'testsuite') 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 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) -- cgit