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/systemtap.base/timers.stp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'testsuite/systemtap.base') 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