summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-06-10 14:01:57 +0000
committerAndrew Tridgell <tridge@samba.org>2003-06-10 14:01:57 +0000
commit7c6aee526aa2f4636e9c1e9694e80e10e875bef7 (patch)
tree1b731ad3077162782f84d2c923a97d3f8a67c548
parent0d556758de08a450fe7a725acef9c73c76688d81 (diff)
downloadsamba-7c6aee526aa2f4636e9c1e9694e80e10e875bef7.tar.gz
samba-7c6aee526aa2f4636e9c1e9694e80e10e875bef7.tar.bz2
samba-7c6aee526aa2f4636e9c1e9694e80e10e875bef7.zip
fixed smbtorture LOCK1 test to know about the correct multiplier for
timed blocking locks (This used to be commit 24feb1afa621c4f93135f36e635af08abe8e7c24)
-rw-r--r--source3/torture/torture.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 07d7f1547e..f26ebb49b3 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -866,7 +866,7 @@ static BOOL run_locktest1(int dummy)
lock_timeout = (1 + (random() % 20));
printf("Testing lock timeout with timeout=%u\n", lock_timeout);
t1 = time(NULL);
- if (cli_lock(cli2, fnum3, 0, 4, lock_timeout * 1000, WRITE_LOCK)) {
+ if (cli_lock(cli2, fnum3, 0, 4, lock_timeout * 500, WRITE_LOCK)) {
printf("lock3 succeeded! This is a locking bug\n");
return False;
} else {
@@ -875,9 +875,10 @@ static BOOL run_locktest1(int dummy)
}
t2 = time(NULL);
- if (t2 - t1 < 5) {
+ if (ABS(t2 - t1) < lock_timeout-1) {
printf("error: This server appears not to support timed lock requests\n");
}
+
printf("server slept for %u seconds for a %u second timeout\n",
(unsigned int)(t2-t1), lock_timeout);