From 0d60b9af90962e8db41fdc02cbda562297b1e6d4 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 7 Feb 2007 07:11:20 +0000 Subject: r21216: fail the RAW-BENCH-LOCK test if the locking doesn't happen evenly across the connections (This used to be commit 01ef699981f3bcbbbdd4a47d9b85324aec783451) --- source4/torture/raw/lockbench.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/source4/torture/raw/lockbench.c b/source4/torture/raw/lockbench.c index c3908124aa..4dbefd5d9b 100644 --- a/source4/torture/raw/lockbench.c +++ b/source4/torture/raw/lockbench.c @@ -105,7 +105,7 @@ BOOL torture_bench_lock(struct torture_context *torture) struct timeval tv; struct event_context *ev = event_context_find(mem_ctx); struct benchlock_state *state; - int total = 0, loops=0; + int total = 0, loops=0, minops=0; NTSTATUS status; nprocs = lp_parm_int(-1, "torture", "nprocs", 4); @@ -176,6 +176,15 @@ BOOL torture_bench_lock(struct torture_context *torture) } printf("%.2f ops/second\n", total/timeval_elapsed(&tv)); + minops = state[0].count; + for (i=0;i