[PATCH] [SAMBA3] trivial fix to OPLOCK2 test

James Peach jpeach at sgi.com
Thu Mar 3 03:53:44 GMT 2005


Hi all,

The attached diff fixes the OPLOCK2 smbtorture test. When the parent
process does a read to process the oplock break, we need to expect to
read 0 bytes, because the file is empty. The diff is against SVN SAMBA_3_0.

This is the same problem noted here:
    http://marc.theaimsgroup.com/?l=samba-technical&m=107219728129199&w=2

I guess this is why the build farm machines don't run OPLOCK2?

cheers,

-- 
James Peach | jpeach at sgi.com | SGI Australian Software Group
I don't speak for SGI.
-------------- next part --------------
Index: source/torture/torture.c
===================================================================
--- source/torture/torture.c	(revision 5208)
+++ source/torture/torture.c	(working copy)
@@ -2666,9 +2666,11 @@
 
 	sleep(2);
 
-	/* Ensure cli1 processes the break. */
+	/* Ensure cli1 processes the break. Empty file should always return 0
+	 * bytes.
+	 */
 
-	if (cli_read(cli1, fnum1, buf, 0, 4) != 4) {
+	if (cli_read(cli1, fnum1, buf, 0, 4) != 0) {
 		printf("read on fnum1 failed (%s)\n", cli_errstr(cli1));
 		correct = False;
 	}


More information about the samba-technical mailing list