expanded the RAW-READ test to make it clearer that all locks conflict
authorAndrew Tridgell <tridge@samba.org>
Fri, 29 Aug 2003 04:35:35 +0000 (04:35 +0000)
committerAndrew Tridgell <tridge@samba.org>
Fri, 29 Aug 2003 04:35:35 +0000 (04:35 +0000)
in SMBlockread, not just other peoples locks (error in spec)

source/torture/raw/read.c

index 50b3e0f2fbe33bfcbcee946d0df70462846d7adc..e0432651dc44457ffd96b2521596fe99d9e0b7cd 100644 (file)
@@ -243,10 +243,16 @@ static BOOL test_lockread(struct cli_state *cli, TALLOC_CTX *mem_ctx)
        CHECK_STATUS(status, NT_STATUS_OK);
        CHECK_VALUE(io.lockread.out.nread, 0);
 
+       status = smb_raw_read(cli->tree, &io);
+       CHECK_STATUS(status, NT_STATUS_LOCK_NOT_GRANTED);
+
+       status = smb_raw_read(cli->tree, &io);
+       CHECK_STATUS(status, NT_STATUS_FILE_LOCK_CONFLICT);
+
        printf("Trying zero file read\n");
        io.lockread.in.count = 0;
        status = smb_raw_read(cli->tree, &io);
-       CHECK_STATUS(status, NT_STATUS_LOCK_NOT_GRANTED);
+       CHECK_STATUS(status, NT_STATUS_FILE_LOCK_CONFLICT);
 
        printf("Trying bad fnum\n");
        io.lockread.in.fnum = fnum+1;