Author: tridge
Date: 2004-10-26 06:18:56 +0000 (Tue, 26 Oct 2004)
New Revision: 3242

WebSVN: 
http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source/torture/raw&rev=3242&nolog=1

Log:
make the RAW-READ test not exercise the 0-0 lock, which is not deterministic


Modified:
   branches/SAMBA_4_0/source/torture/raw/read.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/raw/read.c
===================================================================
--- branches/SAMBA_4_0/source/torture/raw/read.c        2004-10-26 06:17:52 UTC (rev 
3241)
+++ branches/SAMBA_4_0/source/torture/raw/read.c        2004-10-26 06:18:56 UTC (rev 
3242)
@@ -235,7 +235,7 @@
        printf("Trying empty file read\n");
        io.lockread.in.fnum = fnum;
        io.lockread.in.count = 1;
-       io.lockread.in.offset = 0;
+       io.lockread.in.offset = 1;
        io.lockread.in.remaining = 0;
        io.lockread.out.data = buf;
        status = smb_raw_read(cli->tree, &io);
@@ -252,8 +252,10 @@
        printf("Trying zero file read\n");
        io.lockread.in.count = 0;
        status = smb_raw_read(cli->tree, &io);
-       CHECK_STATUS(status, NT_STATUS_FILE_LOCK_CONFLICT);
+       CHECK_STATUS(status, NT_STATUS_OK);
 
+       smbcli_unlock(cli->tree, fnum, 1, 1);
+
        printf("Trying bad fnum\n");
        io.lockread.in.fnum = fnum+1;
        status = smb_raw_read(cli->tree, &io);
@@ -268,9 +270,9 @@
        io.lockread.in.remaining = 0;
        io.lockread.in.count = strlen(test_data);
        status = smb_raw_read(cli->tree, &io);
-       CHECK_STATUS(status, NT_STATUS_FILE_LOCK_CONFLICT);
+       CHECK_STATUS(status, NT_STATUS_LOCK_NOT_GRANTED);
 
-       smbcli_unlock(cli->tree, fnum, 0, 1);
+       smbcli_unlock(cli->tree, fnum, 1, 0);
 
        status = smb_raw_read(cli->tree, &io);
        CHECK_STATUS(status, NT_STATUS_OK);

Reply via email to