From df8bce7ac2ffe1d6402f61f07d54bfe568fd6ce8 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 28 Jul 2005 04:06:54 +0000 Subject: r8817: - fixed return result from LOCAL-MESSAGING test - added timelimit support (This used to be commit dbac93e313a149bc4c0053f6962289e71b168fb3) --- source4/torture/local/messaging.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source4/torture/local') diff --git a/source4/torture/local/messaging.c b/source4/torture/local/messaging.c index 22b05a12b5..c9aef1b01d 100644 --- a/source4/torture/local/messaging.c +++ b/source4/torture/local/messaging.c @@ -63,6 +63,7 @@ static BOOL test_ping_speed(TALLOC_CTX *mem_ctx) int pong_count = 0; BOOL ret = True; struct timeval tv; + int timelimit = lp_parm_int(-1, "torture", "timelimit", 10); lp_set_cmdline("lock dir", "lockdir.tmp"); @@ -88,8 +89,8 @@ static BOOL test_ping_speed(TALLOC_CTX *mem_ctx) tv = timeval_current(); - printf("Sending pings for 10 seconds\n"); - while (timeval_elapsed(&tv) < 10.0) { + printf("Sending pings for %d seconds\n", timelimit); + while (timeval_elapsed(&tv) < timelimit) { DATA_BLOB data; NTSTATUS status1, status2; @@ -150,5 +151,5 @@ BOOL torture_local_messaging(void) talloc_free(mem_ctx); - return True; + return ret; } -- cgit