[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha2-1257-ga70719d

Jeremy Allison jra at samba.org
Tue Mar 11 20:39:43 GMT 2008


The branch, v4-0-test has been updated
       via  a70719d579a7eefbfd973267b95a87aaa6b649b0 (commit)
      from  b2007956aa4534f22ad7fd85b0aee0be769548ae (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test


- Log -----------------------------------------------------------------
commit a70719d579a7eefbfd973267b95a87aaa6b649b0
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Mar 11 13:39:04 2008 -0700

    Samba3.2 now passes a lot more tests - remove the S3 specific
    exemptions.
    Jeremy.

-----------------------------------------------------------------------

Summary of changes:
 source/torture/raw/oplock.c |   99 ++++++++++++++-----------------------------
 1 files changed, 32 insertions(+), 67 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/torture/raw/oplock.c b/source/torture/raw/oplock.c
index 7571a80..ab23ee7 100644
--- a/source/torture/raw/oplock.c
+++ b/source/torture/raw/oplock.c
@@ -229,7 +229,7 @@ static bool test_raw_oplock_exclusive1(struct torture_context *tctx, struct smbc
 	io.ntcreatex.in.security_flags = 0;
 	io.ntcreatex.in.fname = fname;
 
-	torture_comment(tctx, "open a file with an exclusive oplock (share mode: none)\n");
+	torture_comment(tctx, "EXCLUSIVE1: open a file with an exclusive oplock (share mode: none)\n");
 	ZERO_STRUCT(break_info);
 	io.ntcreatex.in.flags = NTCREATEX_FLAGS_EXTENDED | NTCREATEX_FLAGS_REQUEST_OPLOCK;
 
@@ -294,7 +294,7 @@ static bool test_raw_oplock_exclusive2(struct torture_context *tctx, struct smbc
 	io.ntcreatex.in.security_flags = 0;
 	io.ntcreatex.in.fname = fname;
 
-	torture_comment(tctx, "open a file with an exclusive oplock (share mode: all)\n");
+	torture_comment(tctx, "EXCLUSIVE2: open a file with an exclusive oplock (share mode: all)\n");
 	ZERO_STRUCT(break_info);
 	io.ntcreatex.in.flags = NTCREATEX_FLAGS_EXTENDED | NTCREATEX_FLAGS_REQUEST_OPLOCK;
 	io.ntcreatex.in.share_access = NTCREATEX_SHARE_ACCESS_READ|
@@ -388,7 +388,7 @@ static bool test_raw_oplock_exclusive3(struct torture_context *tctx, struct smbc
 	io.ntcreatex.in.security_flags = 0;
 	io.ntcreatex.in.fname = fname;
 
-	torture_comment(tctx, "open a file with an exclusive oplock (share mode: none)\n");
+	torture_comment(tctx, "EXCLUSIVE3: open a file with an exclusive oplock (share mode: none)\n");
 
 	ZERO_STRUCT(break_info);
 	io.ntcreatex.in.flags = NTCREATEX_FLAGS_EXTENDED | NTCREATEX_FLAGS_REQUEST_OPLOCK;
@@ -452,7 +452,7 @@ static bool test_raw_oplock_exclusive4(struct torture_context *tctx, struct smbc
 	io.ntcreatex.in.security_flags = 0;
 	io.ntcreatex.in.fname = fname;
 
-	torture_comment(tctx, "open with exclusive oplock\n");
+	torture_comment(tctx, "EXCLUSIVE4: open with exclusive oplock\n");
 	ZERO_STRUCT(break_info);
 	smbcli_oplock_handler(cli1->transport, oplock_handler_ack_to_given, cli1->tree);
 
@@ -517,7 +517,7 @@ static bool test_raw_oplock_exclusive5(struct torture_context *tctx, struct smbc
 	io.ntcreatex.in.security_flags = 0;
 	io.ntcreatex.in.fname = fname;
 
-	torture_comment(tctx, "open with exclusive oplock\n");
+	torture_comment(tctx, "EXCLUSIVE5: open with exclusive oplock\n");
 	ZERO_STRUCT(break_info);
 	smbcli_oplock_handler(cli1->transport, oplock_handler_ack_to_given, cli1->tree);
 
@@ -564,7 +564,6 @@ static bool test_raw_oplock_exclusive6(struct torture_context *tctx, struct smbc
 	union smb_open io;
 	union smb_rename rn;
 	uint16_t fnum=0;
-	bool s3 = torture_setting_bool(tctx, "samba3", false);
 
 	if (!torture_setup_dir(cli1, BASEDIR)) {
 		return false;
@@ -591,16 +590,9 @@ static bool test_raw_oplock_exclusive6(struct torture_context *tctx, struct smbc
 	io.ntcreatex.in.security_flags = 0;
 	io.ntcreatex.in.fname = fname1;
 
-	/* we should use no share mode, when samba3 passes this */
-	torture_comment(tctx, "open a file with an exclusive oplock (share mode: %s)\n",
-			s3?"all":"none");
+	torture_comment(tctx, "EXCLUSIVE6: open a file with an exclusive oplock (share mode: none)\n");
 	ZERO_STRUCT(break_info);
 	io.ntcreatex.in.flags = NTCREATEX_FLAGS_EXTENDED | NTCREATEX_FLAGS_REQUEST_OPLOCK;
-	if (s3) {
-		io.ntcreatex.in.share_access = NTCREATEX_SHARE_ACCESS_READ|
-			NTCREATEX_SHARE_ACCESS_WRITE|
-			NTCREATEX_SHARE_ACCESS_DELETE;
-	}
 
 	status = smb_raw_open(cli1->tree, tctx, &io);
 	CHECK_STATUS(tctx, status, NT_STATUS_OK);
@@ -667,7 +659,7 @@ static bool test_raw_oplock_batch1(struct torture_context *tctx, struct smbcli_s
 	/*
 	  with a batch oplock we get a break
 	*/
-	torture_comment(tctx, "open with batch oplock\n");
+	torture_comment(tctx, "BATCH1: open with batch oplock\n");
 	ZERO_STRUCT(break_info);
 	io.ntcreatex.in.flags = NTCREATEX_FLAGS_EXTENDED | 
 		NTCREATEX_FLAGS_REQUEST_OPLOCK | 
@@ -748,7 +740,7 @@ static bool test_raw_oplock_batch2(struct torture_context *tctx, struct smbcli_s
 	io.ntcreatex.in.security_flags = 0;
 	io.ntcreatex.in.fname = fname;
 
-	torture_comment(tctx, "open with batch oplock\n");
+	torture_comment(tctx, "BATCH2: open with batch oplock\n");
 	ZERO_STRUCT(break_info);
 	io.ntcreatex.in.flags = NTCREATEX_FLAGS_EXTENDED | 
 		NTCREATEX_FLAGS_REQUEST_OPLOCK | 
@@ -826,7 +818,7 @@ static bool test_raw_oplock_batch3(struct torture_context *tctx, struct smbcli_s
 	io.ntcreatex.in.security_flags = 0;
 	io.ntcreatex.in.fname = fname;
 
-	torture_comment(tctx, "if we close on break then the unlink can succeed\n");
+	torture_comment(tctx, "BATCH3: if we close on break then the unlink can succeed\n");
 	ZERO_STRUCT(break_info);
 	smbcli_oplock_handler(cli1->transport, oplock_handler_close, cli1->tree);
 	io.ntcreatex.in.flags = NTCREATEX_FLAGS_EXTENDED | 
@@ -890,7 +882,7 @@ static bool test_raw_oplock_batch4(struct torture_context *tctx, struct smbcli_s
 	io.ntcreatex.in.security_flags = 0;
 	io.ntcreatex.in.fname = fname;
 
-	torture_comment(tctx, "a self read should not cause a break\n");
+	torture_comment(tctx, "BATCH4: a self read should not cause a break\n");
 	ZERO_STRUCT(break_info);
 	smbcli_oplock_handler(cli1->transport, oplock_handler_ack_to_given, cli1->tree);
 
@@ -953,7 +945,7 @@ static bool test_raw_oplock_batch5(struct torture_context *tctx, struct smbcli_s
 	io.ntcreatex.in.security_flags = 0;
 	io.ntcreatex.in.fname = fname;
 
-	torture_comment(tctx, "a 2nd open should give a break\n");
+	torture_comment(tctx, "BATCH5: a 2nd open should give a break\n");
 	ZERO_STRUCT(break_info);
 	smbcli_oplock_handler(cli1->transport, oplock_handler_ack_to_given, cli1->tree);
 
@@ -1018,7 +1010,7 @@ static bool test_raw_oplock_batch6(struct torture_context *tctx, struct smbcli_s
 	io.ntcreatex.in.security_flags = 0;
 	io.ntcreatex.in.fname = fname;
 
-	torture_comment(tctx, "a 2nd open should give a break to level II if the first open allowed shared read\n");
+	torture_comment(tctx, "BATCH6: a 2nd open should give a break to level II if the first open allowed shared read\n");
 	ZERO_STRUCT(break_info);
 	smbcli_oplock_handler(cli1->transport, oplock_handler_ack_to_given, cli1->tree);
 	smbcli_oplock_handler(cli2->transport, oplock_handler_ack_to_given, cli2->tree);
@@ -1098,7 +1090,7 @@ static bool test_raw_oplock_batch7(struct torture_context *tctx, struct smbcli_s
 	io.ntcreatex.in.security_flags = 0;
 	io.ntcreatex.in.fname = fname;
 
-	torture_comment(tctx, "a 2nd open should get an oplock when we close instead of ack\n");
+	torture_comment(tctx, "BATCH7: a 2nd open should get an oplock when we close instead of ack\n");
 	ZERO_STRUCT(break_info);
 	smbcli_oplock_handler(cli1->transport, oplock_handler_close, cli1->tree);
 
@@ -1168,7 +1160,7 @@ static bool test_raw_oplock_batch8(struct torture_context *tctx, struct smbcli_s
 	io.ntcreatex.in.security_flags = 0;
 	io.ntcreatex.in.fname = fname;
 
-	torture_comment(tctx, "open with batch oplock\n");
+	torture_comment(tctx, "BATCH8: open with batch oplock\n");
 	ZERO_STRUCT(break_info);
 	smbcli_oplock_handler(cli1->transport, oplock_handler_ack_to_given, cli1->tree);
 
@@ -1237,7 +1229,7 @@ static bool test_raw_oplock_batch9(struct torture_context *tctx, struct smbcli_s
 	io.ntcreatex.in.security_flags = 0;
 	io.ntcreatex.in.fname = fname;
 
-	torture_comment(tctx, "open with attributes only can create file\n");
+	torture_comment(tctx, "BATCH9: open with attributes only can create file\n");
 
 	io.ntcreatex.in.flags = NTCREATEX_FLAGS_EXTENDED | 
 		NTCREATEX_FLAGS_REQUEST_OPLOCK | 
@@ -1342,7 +1334,7 @@ static bool test_raw_oplock_batch10(struct torture_context *tctx, struct smbcli_
 	io.ntcreatex.in.security_flags = 0;
 	io.ntcreatex.in.fname = fname;
 
-	torture_comment(tctx, "Open with oplock after a non-oplock open should grant level2\n");
+	torture_comment(tctx, "BATCH10: Open with oplock after a non-oplock open should grant level2\n");
 	ZERO_STRUCT(break_info);
 	io.ntcreatex.in.flags = NTCREATEX_FLAGS_EXTENDED;
 	io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
@@ -1452,7 +1444,7 @@ static bool test_raw_oplock_batch11(struct torture_context *tctx, struct smbcli_
 	io.ntcreatex.in.fname = fname;
 
 	/* Test if a set-eof on pathname breaks an exclusive oplock. */
-	torture_comment(tctx, "Test if setpathinfo set EOF breaks oplocks.\n");
+	torture_comment(tctx, "BATCH11: Test if setpathinfo set EOF breaks oplocks.\n");
 
 	ZERO_STRUCT(break_info);
 	smbcli_oplock_handler(cli1->transport, oplock_handler_ack_to_given, cli1->tree);
@@ -1527,7 +1519,7 @@ static bool test_raw_oplock_batch12(struct torture_context *tctx, struct smbcli_
 	io.ntcreatex.in.fname = fname;
 
 	/* Test if a set-allocation size on pathname breaks an exclusive oplock. */
-	torture_comment(tctx, "Test if setpathinfo allocation size breaks oplocks.\n");
+	torture_comment(tctx, "BATCH12: Test if setpathinfo allocation size breaks oplocks.\n");
 
 	ZERO_STRUCT(break_info);
 	smbcli_oplock_handler(cli1->transport, oplock_handler_ack_to_given, cli1->tree);
@@ -1601,7 +1593,7 @@ static bool test_raw_oplock_batch13(struct torture_context *tctx, struct smbcli_
 	io.ntcreatex.in.security_flags = 0;
 	io.ntcreatex.in.fname = fname;
 
-	torture_comment(tctx, "open with batch oplock\n");
+	torture_comment(tctx, "BATCH13: open with batch oplock\n");
 	ZERO_STRUCT(break_info);
 	smbcli_oplock_handler(cli1->transport, oplock_handler_ack_to_given, cli1->tree);
 
@@ -1678,7 +1670,7 @@ static bool test_raw_oplock_batch14(struct torture_context *tctx, struct smbcli_
 	io.ntcreatex.in.security_flags = 0;
 	io.ntcreatex.in.fname = fname;
 
-	torture_comment(tctx, "open with batch oplock\n");
+	torture_comment(tctx, "BATCH14: open with batch oplock\n");
 	ZERO_STRUCT(break_info);
 	smbcli_oplock_handler(cli1->transport, oplock_handler_ack_to_given, cli1->tree);
 
@@ -1755,7 +1747,7 @@ static bool test_raw_oplock_batch15(struct torture_context *tctx, struct smbcli_
 	io.ntcreatex.in.fname = fname;
 
 	/* Test if a qpathinfo all info on pathname breaks a batch oplock. */
-	torture_comment(tctx, "Test if qpathinfo all info breaks a batch oplock (should not).\n");
+	torture_comment(tctx, "BATCH15: Test if qpathinfo all info breaks a batch oplock (should not).\n");
 
 	ZERO_STRUCT(break_info);
 	smbcli_oplock_handler(cli1->transport, oplock_handler_ack_to_given, cli1->tree);
@@ -1827,7 +1819,7 @@ static bool test_raw_oplock_batch16(struct torture_context *tctx, struct smbcli_
 	io.ntcreatex.in.security_flags = 0;
 	io.ntcreatex.in.fname = fname;
 
-	torture_comment(tctx, "open with batch oplock\n");
+	torture_comment(tctx, "BATCH16: open with batch oplock\n");
 	ZERO_STRUCT(break_info);
 	smbcli_oplock_handler(cli1->transport, oplock_handler_ack_to_given, cli1->tree);
 
@@ -1881,7 +1873,6 @@ static bool test_raw_oplock_batch17(struct torture_context *tctx, struct smbcli_
 	union smb_open io;
 	union smb_rename rn;
 	uint16_t fnum=0;
-	bool s3 = torture_setting_bool(tctx, "samba3", false);
 
 	if (!torture_setup_dir(cli1, BASEDIR)) {
 		return false;
@@ -1908,18 +1899,12 @@ static bool test_raw_oplock_batch17(struct torture_context *tctx, struct smbcli_
 	io.ntcreatex.in.security_flags = 0;
 	io.ntcreatex.in.fname = fname1;
 
-	/* we should use no share mode, when samba3 passes this */
-	torture_comment(tctx, "open a file with an batch oplock (share mode: %s)\n",
-			s3?"all":"none");
+	torture_comment(tctx, "BATCH17: open a file with an batch oplock (share mode: none)\n");
+
 	ZERO_STRUCT(break_info);
 	io.ntcreatex.in.flags = NTCREATEX_FLAGS_EXTENDED |
 		NTCREATEX_FLAGS_REQUEST_OPLOCK |
 		NTCREATEX_FLAGS_REQUEST_BATCH_OPLOCK;
-	if (s3) {
-		io.ntcreatex.in.share_access = NTCREATEX_SHARE_ACCESS_READ|
-			NTCREATEX_SHARE_ACCESS_WRITE|
-			NTCREATEX_SHARE_ACCESS_DELETE;
-	}
 
 	status = smb_raw_open(cli1->tree, tctx, &io);
 	CHECK_STATUS(tctx, status, NT_STATUS_OK);
@@ -1959,7 +1944,6 @@ static bool test_raw_oplock_batch18(struct torture_context *tctx, struct smbcli_
 	union smb_open io;
 	union smb_rename rn;
 	uint16_t fnum=0;
-	bool s3 = torture_setting_bool(tctx, "samba3", false);
 
 	if (!torture_setup_dir(cli1, BASEDIR)) {
 		return false;
@@ -1986,18 +1970,12 @@ static bool test_raw_oplock_batch18(struct torture_context *tctx, struct smbcli_
 	io.ntcreatex.in.security_flags = 0;
 	io.ntcreatex.in.fname = fname1;
 
-	/* we should use no share mode, when samba3 passes this */
-	torture_comment(tctx, "open a file with an batch oplock (share mode: %s)\n",
-			s3?"all":"none");
+	torture_comment(tctx, "BATCH18: open a file with an batch oplock (share mode: none)\n");
+
 	ZERO_STRUCT(break_info);
 	io.ntcreatex.in.flags = NTCREATEX_FLAGS_EXTENDED |
 		NTCREATEX_FLAGS_REQUEST_OPLOCK |
 		NTCREATEX_FLAGS_REQUEST_BATCH_OPLOCK;
-	if (s3) {
-		io.ntcreatex.in.share_access = NTCREATEX_SHARE_ACCESS_READ|
-			NTCREATEX_SHARE_ACCESS_WRITE|
-			NTCREATEX_SHARE_ACCESS_DELETE;
-	}
 
 	status = smb_raw_open(cli1->tree, tctx, &io);
 	CHECK_STATUS(tctx, status, NT_STATUS_OK);
@@ -2040,10 +2018,6 @@ static bool test_raw_oplock_batch19(struct torture_context *tctx, struct smbcli_
 	union smb_setfileinfo sfi;
 	uint16_t fnum=0;
 
-	if (torture_setting_bool(tctx, "samba3", false)) {
-		torture_skip(tctx, "BACHT19 disabled against samba3\n");
-	}
-
 	if (!torture_setup_dir(cli1, BASEDIR)) {
 		return false;
 	}
@@ -2070,7 +2044,7 @@ static bool test_raw_oplock_batch19(struct torture_context *tctx, struct smbcli_
 	io.ntcreatex.in.security_flags = 0;
 	io.ntcreatex.in.fname = fname1;
 
-	torture_comment(tctx, "open a file with an batch oplock (share mode: none)\n");
+	torture_comment(tctx, "BATCH19: open a file with an batch oplock (share mode: none)\n");
 	ZERO_STRUCT(break_info);
 	io.ntcreatex.in.flags = NTCREATEX_FLAGS_EXTENDED |
 		NTCREATEX_FLAGS_REQUEST_OPLOCK |
@@ -2147,10 +2121,6 @@ bool test_trans2rename(struct torture_context *tctx, struct smbcli_state *cli1,
 	union smb_setfileinfo sfi;
 	uint16_t fnum=0;
 
-	if (torture_setting_bool(tctx, "samba3", false)) {
-		torture_skip(tctx, "trans2rename disabled against samba3\n");
-	}
-
 	if (!torture_setup_dir(cli1, BASEDIR)) {
 		return false;
 	}
@@ -2248,10 +2218,6 @@ static bool test_raw_oplock_batch20(struct torture_context *tctx, struct smbcli_
 	union smb_setfileinfo sfi;
 	uint16_t fnum=0,fnum2=0;
 
-	if (torture_setting_bool(tctx, "samba3", false)) {
-		torture_skip(tctx, "BACHT20 disabled against samba3\n");
-	}
-
 	if (!torture_setup_dir(cli1, BASEDIR)) {
 		return false;
 	}
@@ -2278,7 +2244,7 @@ static bool test_raw_oplock_batch20(struct torture_context *tctx, struct smbcli_
 	io.ntcreatex.in.security_flags = 0;
 	io.ntcreatex.in.fname = fname1;
 
-	torture_comment(tctx, "open a file with an batch oplock (share mode: all)\n");
+	torture_comment(tctx, "BATCH20: open a file with an batch oplock (share mode: all)\n");
 	ZERO_STRUCT(break_info);
 	io.ntcreatex.in.flags = NTCREATEX_FLAGS_EXTENDED |
 		NTCREATEX_FLAGS_REQUEST_OPLOCK |
@@ -2312,7 +2278,6 @@ static bool test_raw_oplock_batch20(struct torture_context *tctx, struct smbcli_
 	CHECK_STATUS(tctx, status, NT_STATUS_OK);
 	CHECK_STRMATCH(qfi.all_info.out.fname.s, fname2);
 
-	/* we should use no share mode, when samba3 passes this */
 	torture_comment(tctx, "open a file with the new name an batch oplock (share mode: all)\n");
 	ZERO_STRUCT(break_info);
 	io.ntcreatex.in.flags = NTCREATEX_FLAGS_EXTENDED |
@@ -2407,7 +2372,7 @@ static bool test_raw_oplock_batch21(struct torture_context *tctx, struct smbcli_
 	/*
 	  with a batch oplock we get a break
 	*/
-	torture_comment(tctx, "open with batch oplock\n");
+	torture_comment(tctx, "BATCH21: open with batch oplock\n");
 	ZERO_STRUCT(break_info);
 	io.ntcreatex.in.flags = NTCREATEX_FLAGS_EXTENDED |
 		NTCREATEX_FLAGS_REQUEST_OPLOCK |
@@ -2480,7 +2445,7 @@ static bool test_raw_oplock_batch22(struct torture_context *tctx, struct smbcli_
 	/*
 	  with a batch oplock we get a break
 	*/
-	torture_comment(tctx, "open with batch oplock\n");
+	torture_comment(tctx, "BATCH22: open with batch oplock\n");
 	ZERO_STRUCT(break_info);
 	io.ntcreatex.in.flags = NTCREATEX_FLAGS_EXTENDED |
 		NTCREATEX_FLAGS_REQUEST_OPLOCK |
@@ -2570,7 +2535,7 @@ static bool test_raw_oplock_batch23(struct torture_context *tctx, struct smbcli_
 	io.ntcreatex.in.security_flags = 0;
 	io.ntcreatex.in.fname = fname;
 
-	torture_comment(tctx, "a open and ask for a batch oplock\n");
+	torture_comment(tctx, "BATCH23: a open and ask for a batch oplock\n");
 	ZERO_STRUCT(break_info);
 	smbcli_oplock_handler(cli1->transport, oplock_handler_ack_to_given, cli1->tree);
 	smbcli_oplock_handler(cli2->transport, oplock_handler_ack_to_given, cli2->tree);
@@ -2657,7 +2622,7 @@ static bool test_raw_oplock_batch24(struct torture_context *tctx, struct smbcli_
 	io.ntcreatex.in.security_flags = 0;
 	io.ntcreatex.in.fname = fname;
 
-	torture_comment(tctx, "a open without level support and ask for a batch oplock\n");
+	torture_comment(tctx, "BATCH24: a open without level support and ask for a batch oplock\n");
 	ZERO_STRUCT(break_info);
 	smbcli_oplock_handler(cli1->transport, oplock_handler_ack_to_given, cli1->tree);
 	smbcli_oplock_handler(cli2->transport, oplock_handler_ack_to_given, cli2->tree);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list