torture RAW-OPLOCK

Peter Waechtler peter at helios.de
Tue Sep 21 13:20:22 GMT 2004


A torture against 3.0.6:

$ smbtorture //samba/volume RAW-OPLOCK
Running RAW-OPLOCK
open a file with a normal oplock
unlink it - should be no break
open with batch oplock
unlink should generate a break
Acking in oplock handler
(158) wrong value for break_info.level  got 0x0 - should be 0x1
if we close on break then the unlink can succeed
Closing in oplock handler
(182) wrong value for break_info.level  got 0x0 - should be 0x1
a self read should not cause a break
a 2nd open should give a break
Acking in oplock handler
(229) wrong value for break_info.level  got 0x0 - should be 0x1
a 2nd open should get an oplock when we close instead of ack
Closing in oplock handler
(256) wrong value for break_info.level  got 0x0 - should be 0x1
open with batch oplock
second open with attributes only shouldn't cause oplock break
open with attributes only can create file
Subsequent normal open should break oplock on attribute only open to level II
Acking in oplock handler
(317) wrong value for io.ntcreatex.out.oplock_level  got 0x0 - should be 0x3
TEST RAW-OPLOCK FAILED!
RAW-OPLOCK took 3.1571 secs

branches/SAMBA_4_0/source/torture/raw/oplock.c
Diff for /branches/SAMBA_4_0/source/torture/raw/oplock.c between version 943 and 946
version 943, Sat May 29 08:11:46 2004 UTC 	version 946, Sun May 30 08:12:17 2004 UTC
Line 156 
	
         CHECK_VAL(break_info.fnum, fnum); 	         CHECK_VAL(break_info.fnum, fnum);
         CHECK_VAL(break_info.level, 2); 	         CHECK_VAL(break_info.level, 1);
         CHECK_VAL(break_info.count, 1); 	         CHECK_VAL(break_info.count, 1);



I think this is wrong. On an oplock break the level means:

/* Oplock levels */
#define OPLOCKLEVEL_NONE 0
#define OPLOCKLEVEL_II 1


On the response on a NTCreateX:

/*
 * Return values for oplock types.
 */
#define NO_OPLOCK_RETURN 0
#define EXCLUSIVE_OPLOCK_RETURN 1
#define BATCH_OPLOCK_RETURN 2
#define LEVEL_II_OPLOCK_RETURN 3

On a break the level says: broken to NONE or to a Level2 oplock.
Only in return of NTCreateX we tell which oplock was granted.

Before the merge of revision 6 the test was fine (also on our product :).




More information about the samba-technical mailing list