From 82af221e4a7e456f580f16bc5d2fd904fc018c96 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 14 Jan 2000 04:32:57 +0000 Subject: we now pass all byte range locking tests the last piece was to use a smb timeout slightly larger than the locking timeout in bloking locks to prevent a race (This used to be commit 1b54cb4a33a65e62c2e3189b78ef073869a60c75) --- source3/utils/torture.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'source3/utils') diff --git a/source3/utils/torture.c b/source3/utils/torture.c index ba510c0b58..4539f11a6a 100644 --- a/source3/utils/torture.c +++ b/source3/utils/torture.c @@ -242,7 +242,7 @@ static BOOL rw_torture(struct cli_state *c) printf("unlink failed (%s)\n", cli_errstr(c)); } - if (!cli_unlock(c, fnum2, n*sizeof(int), sizeof(int), -1)) { + if (!cli_unlock(c, fnum2, n*sizeof(int), sizeof(int))) { printf("unlock failed (%s)\n", cli_errstr(c)); } } @@ -550,8 +550,6 @@ static void run_locktest2(int dummy) cli_setpid(&cli, 1); - sleep(10); - if (!cli_lock(&cli, fnum1, 0, 4, 0, WRITE_LOCK)) { printf("lock1 failed (%s)\n", cli_errstr(&cli)); return; @@ -565,7 +563,7 @@ static void run_locktest2(int dummy) cli_setpid(&cli, 2); - if (cli_unlock(&cli, fnum1, 0, 4, 0)) { + if (cli_unlock(&cli, fnum1, 0, 8)) { printf("unlock1 succeeded! This is a locking bug\n"); } @@ -677,14 +675,14 @@ static void run_locktest3(int dummy) for (offset=i=0;i