summaryrefslogtreecommitdiff
path: root/source4/torture/local/messaging.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-07-28 04:06:54 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:30:08 -0500
commitdf8bce7ac2ffe1d6402f61f07d54bfe568fd6ce8 (patch)
tree9bb9673cf9e363db9e2cafa618ca00dec8d68514 /source4/torture/local/messaging.c
parent6553dd0c60e922f42de347a02c8f792f087c393c (diff)
downloadsamba-df8bce7ac2ffe1d6402f61f07d54bfe568fd6ce8.tar.gz
samba-df8bce7ac2ffe1d6402f61f07d54bfe568fd6ce8.tar.bz2
samba-df8bce7ac2ffe1d6402f61f07d54bfe568fd6ce8.zip
r8817: - fixed return result from LOCAL-MESSAGING test
- added timelimit support (This used to be commit dbac93e313a149bc4c0053f6962289e71b168fb3)
Diffstat (limited to 'source4/torture/local/messaging.c')
-rw-r--r--source4/torture/local/messaging.c7
1 files changed, 4 insertions, 3 deletions
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;
}