[SCM] Samba Shared Repository - branch master updated

Andrew Bartlett abartlet at samba.org
Mon Apr 30 00:35:03 MDT 2012


The branch, master has been updated
       via  645e4bb s4-torture: convert samba3misc tests to use torture_failure and torture_assert
       via  6b982c3 s4-torture: move samba3 tests to use torture helper functions
       via  7e9ed05 s4-torture: Move various samba3 tests to the torture_suite_add_1smb_test wrapper
      from  773304e s4:samldb LDB module - implement "fSMORoleOwner" attribute protection

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 645e4bb436c9b194477e4a66d98577a76b0b6ad7
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Apr 30 14:57:41 2012 +1000

    s4-torture: convert samba3misc tests to use torture_failure and torture_assert
    
    This helps us when these tests fail, as subunit-formatted failures can
    be declared as knownfail entries, and show up correctly in the make
    test output.
    
    Andrew Bartlett
    
    Autobuild-User: Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date: Mon Apr 30 08:34:52 CEST 2012 on sn-devel-104

commit 6b982c365cc8461b869f7a126d29876df0c45e69
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Apr 30 14:15:12 2012 +1000

    s4-torture: move samba3 tests to use torture helper functions

commit 7e9ed052778d22e4d70bed444b226461dced01b6
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Apr 30 14:05:19 2012 +1000

    s4-torture: Move various samba3 tests to the torture_suite_add_1smb_test wrapper

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

Summary of changes:
 source4/torture/raw/raw.c        |   14 +-
 source4/torture/raw/samba3hide.c |   20 +--
 source4/torture/raw/samba3misc.c |  333 +++++++++++++-------------------------
 3 files changed, 123 insertions(+), 244 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/raw/raw.c b/source4/torture/raw/raw.c
index 10a0e89..cf3a5cb 100644
--- a/source4/torture/raw/raw.c
+++ b/source4/torture/raw/raw.c
@@ -63,16 +63,16 @@ NTSTATUS torture_raw_init(void)
 	torture_suite_add_suite(suite, torture_raw_streams(suite));
 	torture_suite_add_suite(suite, torture_raw_acls(suite));
 	torture_suite_add_suite(suite, torture_raw_composite(suite));
-	torture_suite_add_simple_test(suite, "samba3hide", torture_samba3_hide);
-	torture_suite_add_simple_test(suite, "samba3closeerr", torture_samba3_closeerr);
-	torture_suite_add_simple_test(suite, "samba3rootdirfid",
+	torture_suite_add_1smb_test(suite, "samba3hide", torture_samba3_hide);
+	torture_suite_add_1smb_test(suite, "samba3closeerr", torture_samba3_closeerr);
+	torture_suite_add_1smb_test(suite, "samba3rootdirfid",
 				      torture_samba3_rootdirfid);
-	torture_suite_add_simple_test(suite, "samba3checkfsp", torture_samba3_checkfsp);
-	torture_suite_add_simple_test(suite, "samba3oplocklogoff", torture_samba3_oplock_logoff);
+	torture_suite_add_1smb_test(suite, "samba3checkfsp", torture_samba3_checkfsp);
+	torture_suite_add_1smb_test(suite, "samba3oplocklogoff", torture_samba3_oplock_logoff);
 	torture_suite_add_simple_test(suite, "samba3badpath", torture_samba3_badpath);
-	torture_suite_add_simple_test(suite, "samba3caseinsensitive",
+	torture_suite_add_1smb_test(suite, "samba3caseinsensitive",
 				      torture_samba3_caseinsensitive);
-	torture_suite_add_simple_test(suite, "samba3posixtimedlock",
+	torture_suite_add_1smb_test(suite, "samba3posixtimedlock",
 				      torture_samba3_posixtimedlock);
 	torture_suite_add_simple_test(suite, "scan-eamax", torture_max_eas);
 
diff --git a/source4/torture/raw/samba3hide.c b/source4/torture/raw/samba3hide.c
index c3a572c..f980ffc 100644
--- a/source4/torture/raw/samba3hide.c
+++ b/source4/torture/raw/samba3hide.c
@@ -154,21 +154,14 @@ static NTSTATUS smbcli_chmod(struct smbcli_tree *tree, const char *fname,
 	return smb_raw_setpathinfo(tree, &sfinfo);
 }
 
-bool torture_samba3_hide(struct torture_context *torture)
+bool torture_samba3_hide(struct torture_context *torture, struct smbcli_state *cli)
 {
-	struct smbcli_state *cli;
 	const char *fname = "test.txt";
 	int fnum;
 	NTSTATUS status;
 	struct smbcli_tree *hideunread;
 	struct smbcli_tree *hideunwrite;
 
-	if (!torture_open_connection_share(
-		    torture, &cli, torture, torture_setting_string(torture, "host", NULL),
-		    torture_setting_string(torture, "share", NULL), torture->ev)) {
-		torture_fail(torture, "torture_open_connection_share failed\n");
-	}
-
 	status = smbcli_setup_unix(cli->tree);
 	if (!NT_STATUS_IS_OK(status)) {
 		torture_fail(torture,
@@ -277,19 +270,14 @@ bool torture_samba3_hide(struct torture_context *torture)
  * close. smb_close should return NT_STATUS_ACCESS_DENIED.
  */
 
-bool torture_samba3_closeerr(struct torture_context *tctx)
+bool torture_samba3_closeerr(struct torture_context *tctx, struct smbcli_state *cli)
 {
-	struct smbcli_state *cli = NULL;
 	bool result = false;
 	NTSTATUS status;
 	const char *dname = "closeerr.dir";
 	const char *fname = "closeerr.dir\\closerr.txt";
 	int fnum;
 
-	if (!torture_open_connection(&cli, tctx, 0)) {
-		goto fail;
-	}
-
 	smbcli_deltree(cli->tree, dname);
 
 	torture_assert_ntstatus_ok(
@@ -334,9 +322,5 @@ bool torture_samba3_closeerr(struct torture_context *tctx)
 
 	result = true;
 	
- fail:
-	if (cli) {
-		torture_close_connection(cli);
-	}
 	return result;
 }
diff --git a/source4/torture/raw/samba3misc.c b/source4/torture/raw/samba3misc.c
index 07669ed..2004385 100644
--- a/source4/torture/raw/samba3misc.c
+++ b/source4/torture/raw/samba3misc.c
@@ -29,17 +29,16 @@
 #include "param/param.h"
 #include "torture/raw/proto.h"
 
-#define CHECK_STATUS(status, correct) do { \
+#define CHECK_STATUS(torture, status, correct) do {	\
 	if (!NT_STATUS_EQUAL(status, correct)) { \
-		printf("(%s) Incorrect status %s - should be %s\n", \
+		torture_result(torture, TORTURE_FAIL, "%s: Incorrect status %s - should be %s\n", \
 		       __location__, nt_errstr(status), nt_errstr(correct)); \
 		ret = false; \
 	} \
 } while (0)
 
-bool torture_samba3_checkfsp(struct torture_context *torture)
+bool torture_samba3_checkfsp(struct torture_context *torture, struct smbcli_state *cli)
 {
-	struct smbcli_state *cli;
 	const char *fname = "test.txt";
 	const char *dirname = "testdir";
 	int fnum;
@@ -50,41 +49,22 @@ bool torture_samba3_checkfsp(struct torture_context *torture)
 	char buf[16];
 	struct smbcli_tree *tree2;
 
-	if ((mem_ctx = talloc_init("torture_samba3_checkfsp")) == NULL) {
-		d_printf("talloc_init failed\n");
-		return false;
-	}
-
-	if (!torture_open_connection_share(
-		    torture, &cli, torture, torture_setting_string(torture, "host", NULL),
-		    torture_setting_string(torture, "share", NULL), torture->ev)) {
-		d_printf("torture_open_connection_share failed\n");
-		ret = false;
-		goto done;
-	}
+	torture_assert(torture, mem_ctx = talloc_init("torture_samba3_checkfsp"), "talloc_init failed\n");
 
-	smbcli_deltree(cli->tree, dirname);
-
-	status = torture_second_tcon(torture, cli->session,
-				     torture_setting_string(torture, "share", NULL),
-				     &tree2);
-	CHECK_STATUS(status, NT_STATUS_OK);
-	if (!NT_STATUS_IS_OK(status))
-		goto done;
+	torture_assert_ntstatus_equal(torture, torture_second_tcon(torture, cli->session,
+								   torture_setting_string(torture, "share", NULL),
+								   &tree2), 
+				      NT_STATUS_OK,
+				      "creating second tcon");
 
 	/* Try a read on an invalid FID */
 
 	nread = smbcli_read(cli->tree, 4711, buf, 0, sizeof(buf));
-	CHECK_STATUS(smbcli_nt_error(cli->tree), NT_STATUS_INVALID_HANDLE);
+	CHECK_STATUS(torture, smbcli_nt_error(cli->tree), NT_STATUS_INVALID_HANDLE);
 
 	/* Try a read on a directory handle */
 
-	status = smbcli_mkdir(cli->tree, dirname);
-	if (!NT_STATUS_IS_OK(status)) {
-		d_printf("smbcli_mkdir failed: %s\n", nt_errstr(status));
-		ret = false;
-		goto done;
-	}
+	torture_assert(torture, torture_setup_dir(cli, dirname), "creating test directory");
 
 	/* Open the directory */
 	{
@@ -104,7 +84,7 @@ bool torture_samba3_checkfsp(struct torture_context *torture)
 		io.ntcreatex.in.fname = dirname;
 		status = smb_raw_open(cli->tree, mem_ctx, &io);
 		if (!NT_STATUS_IS_OK(status)) {
-			d_printf("smb_open on the directory failed: %s\n",
+			torture_result(torture, TORTURE_FAIL, "smb_open on the directory failed: %s\n",
 				 nt_errstr(status));
 			ret = false;
 			goto done;
@@ -116,24 +96,24 @@ bool torture_samba3_checkfsp(struct torture_context *torture)
 
 	nread = smbcli_read(cli->tree, fnum, buf, 0, sizeof(buf));
 	if (nread >= 0) {
-		d_printf("smbcli_read on a directory succeeded, expected "
+		torture_result(torture, TORTURE_FAIL, "smbcli_read on a directory succeeded, expected "
 			 "failure\n");
 		ret = false;
 	}
 
-	CHECK_STATUS(smbcli_nt_error(cli->tree),
+	CHECK_STATUS(torture, smbcli_nt_error(cli->tree),
 		     NT_STATUS_INVALID_DEVICE_REQUEST);
 
 	/* Same test on the second tcon */
 
 	nread = smbcli_read(tree2, fnum, buf, 0, sizeof(buf));
 	if (nread >= 0) {
-		d_printf("smbcli_read on a directory succeeded, expected "
+		torture_result(torture, TORTURE_FAIL, "smbcli_read on a directory succeeded, expected "
 			 "failure\n");
 		ret = false;
 	}
 
-	CHECK_STATUS(smbcli_nt_error(tree2), NT_STATUS_INVALID_HANDLE);
+	CHECK_STATUS(torture, smbcli_nt_error(tree2), NT_STATUS_INVALID_HANDLE);
 
 	smbcli_close(cli->tree, fnum);
 
@@ -141,20 +121,19 @@ bool torture_samba3_checkfsp(struct torture_context *torture)
 
 	fnum = smbcli_open(cli->tree, fname, O_RDWR|O_CREAT, DENY_NONE);
 	if (fnum == -1) {
-		d_printf("Failed to create %s - %s\n", fname,
+		torture_result(torture, TORTURE_FAIL, "Failed to create %s - %s\n", fname,
 			 smbcli_errstr(cli->tree));
 		ret = false;
 		goto done;
 	}
 
 	nread = smbcli_read(tree2, fnum, buf, 0, sizeof(buf));
-	CHECK_STATUS(smbcli_nt_error(tree2), NT_STATUS_INVALID_HANDLE);
+	CHECK_STATUS(torture, smbcli_nt_error(tree2), NT_STATUS_INVALID_HANDLE);
 
 	smbcli_close(cli->tree, fnum);
 
  done:
 	smbcli_deltree(cli->tree, dirname);
-	torture_close_connection(cli);
 	talloc_free(mem_ctx);
 
 	return ret;
@@ -342,72 +321,50 @@ bool torture_samba3_badpath(struct torture_context *torture)
 	TALLOC_CTX *mem_ctx;
 	bool nt_status_support;
 
-	if (!(mem_ctx = talloc_init("torture_samba3_badpath"))) {
-		d_printf("talloc_init failed\n");
-		return false;
-	}
+	torture_assert(torture, mem_ctx = talloc_init("torture_samba3_badpath"), "talloc_init failed");
 
 	nt_status_support = lpcfg_nt_status_support(torture->lp_ctx);
 
-	if (!lpcfg_set_cmdline(torture->lp_ctx, "nt status support", "yes")) {
-		printf("Could not set 'nt status support = yes'\n");
-		goto fail;
-	}
-
-	if (!torture_open_connection(&cli_nt, torture, 0)) {
-		goto fail;
-	}
+	torture_assert_goto(torture, lpcfg_set_cmdline(torture->lp_ctx, "nt status support", "yes"), ret, fail, "Could not set 'nt status support = yes'\n");
 
-	if (!lpcfg_set_cmdline(torture->lp_ctx, "nt status support", "no")) {
-		printf("Could not set 'nt status support = yes'\n");
-		goto fail;
-	}
+	torture_assert_goto(torture, torture_open_connection(&cli_nt, torture, 0), ret, fail, "Could not open NTSTATUS connection\n");
 
-	if (!torture_open_connection(&cli_dos, torture, 1)) {
-		goto fail;
-	}
+	torture_assert_goto(torture, lpcfg_set_cmdline(torture->lp_ctx, "nt status support", "no"), ret, fail, "Could not set 'nt status support = no'\n");
 
-	if (!lpcfg_set_cmdline(torture->lp_ctx, "nt status support",
-			    nt_status_support ? "yes":"no")) {
-		printf("Could not reset 'nt status support = yes'");
-		goto fail;
-	}
+	torture_assert_goto(torture, torture_open_connection(&cli_dos, torture, 1), ret, fail, "Could not open DOS connection\n");
 
-	smbcli_deltree(cli_nt->tree, dirname);
+	torture_assert_goto(torture, lpcfg_set_cmdline(torture->lp_ctx, "nt status support",
+						       nt_status_support ? "yes":"no"), 
+			    ret, fail, "Could not set 'nt status support' back to where it was\n");
 
-	status = smbcli_mkdir(cli_nt->tree, dirname);
-	if (!NT_STATUS_IS_OK(status)) {
-		d_printf("smbcli_mkdir failed: %s\n", nt_errstr(status));
-		ret = false;
-		goto done;
-	}
+	torture_assert(torture, torture_setup_dir(cli_nt, dirname), "creating test directory");
 
 	status = smbcli_chkpath(cli_nt->tree, dirname);
-	CHECK_STATUS(status, NT_STATUS_OK);
+	CHECK_STATUS(torture, status, NT_STATUS_OK);
 
 	status = smbcli_chkpath(cli_nt->tree,
 				talloc_asprintf(mem_ctx, "%s\\bla", dirname));
-	CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_NOT_FOUND);
+	CHECK_STATUS(torture, status, NT_STATUS_OBJECT_NAME_NOT_FOUND);
 
 	status = smbcli_chkpath(cli_dos->tree,
 				talloc_asprintf(mem_ctx, "%s\\bla", dirname));
-	CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS, ERRbadpath));
+	CHECK_STATUS(torture, status, NT_STATUS_DOS(ERRDOS, ERRbadpath));
 
 	status = smbcli_chkpath(cli_nt->tree,
 				talloc_asprintf(mem_ctx, "%s\\bla\\blub",
 						dirname));
-	CHECK_STATUS(status, NT_STATUS_OBJECT_PATH_NOT_FOUND);
+	CHECK_STATUS(torture, status, NT_STATUS_OBJECT_PATH_NOT_FOUND);
 	status = smbcli_chkpath(cli_dos->tree,
 				talloc_asprintf(mem_ctx, "%s\\bla\\blub",
 						dirname));
-	CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS, ERRbadpath));
+	CHECK_STATUS(torture, status, NT_STATUS_DOS(ERRDOS, ERRbadpath));
+
+	torture_assert_goto(torture, fpath = talloc_asprintf(mem_ctx, "%s\\%s", dirname, fname), 
+			    ret, fail, "Could not allocate fpath\n");
 
-	if (!(fpath = talloc_asprintf(mem_ctx, "%s\\%s", dirname, fname))) {
-		goto fail;
-	}
 	fnum = smbcli_open(cli_nt->tree, fpath, O_RDWR | O_CREAT, DENY_NONE);
 	if (fnum == -1) {
-		d_printf("Could not create file %s: %s\n", fpath,
+		torture_result(torture, TORTURE_FAIL, "Could not create file %s: %s\n", fpath,
 			 smbcli_errstr(cli_nt->tree));
 		goto fail;
 	}
@@ -418,7 +375,7 @@ bool torture_samba3_badpath(struct torture_context *torture)
 	}
 	fnum = smbcli_open(cli_nt->tree, fpath1, O_RDWR | O_CREAT, DENY_NONE);
 	if (fnum == -1) {
-		d_printf("Could not create file %s: %s\n", fpath1,
+		torture_result(torture, TORTURE_FAIL, "Could not create file %s: %s\n", fpath1,
 			 smbcli_errstr(cli_nt->tree));
 		goto fail;
 	}
@@ -429,39 +386,39 @@ bool torture_samba3_badpath(struct torture_context *torture)
 	 */
 
 	status = smbcli_chkpath(cli_nt->tree, fpath);
-	CHECK_STATUS(status, NT_STATUS_NOT_A_DIRECTORY);
+	CHECK_STATUS(torture, status, NT_STATUS_NOT_A_DIRECTORY);
 	status = smbcli_chkpath(cli_dos->tree, fpath);
-	CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS, ERRbadpath));
+	CHECK_STATUS(torture, status, NT_STATUS_DOS(ERRDOS, ERRbadpath));
 
 	status = smbcli_chkpath(cli_nt->tree, "..");
-	CHECK_STATUS(status, NT_STATUS_OBJECT_PATH_SYNTAX_BAD);
+	CHECK_STATUS(torture, status, NT_STATUS_OBJECT_PATH_SYNTAX_BAD);
 	status = smbcli_chkpath(cli_dos->tree, "..");
-	CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS, ERRinvalidpath));
+	CHECK_STATUS(torture, status, NT_STATUS_DOS(ERRDOS, ERRinvalidpath));
 
 	status = smbcli_chkpath(cli_nt->tree, ".");
-	CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
+	CHECK_STATUS(torture, status, NT_STATUS_OBJECT_NAME_INVALID);
 	status = smbcli_chkpath(cli_dos->tree, ".");
-	CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS, ERRbadpath));
+	CHECK_STATUS(torture, status, NT_STATUS_DOS(ERRDOS, ERRbadpath));
 
 	status = smbcli_chkpath(cli_nt->tree, "\t");
-	CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
+	CHECK_STATUS(torture, status, NT_STATUS_OBJECT_NAME_INVALID);
 	status = smbcli_chkpath(cli_dos->tree, "\t");
-	CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS, ERRbadpath));
+	CHECK_STATUS(torture, status, NT_STATUS_DOS(ERRDOS, ERRbadpath));
 
 	status = smbcli_chkpath(cli_nt->tree, "\t\\bla");
-	CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
+	CHECK_STATUS(torture, status, NT_STATUS_OBJECT_NAME_INVALID);
 	status = smbcli_chkpath(cli_dos->tree, "\t\\bla");
-	CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS, ERRbadpath));
+	CHECK_STATUS(torture, status, NT_STATUS_DOS(ERRDOS, ERRbadpath));
 
 	status = smbcli_chkpath(cli_nt->tree, "<");
-	CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
+	CHECK_STATUS(torture, status, NT_STATUS_OBJECT_NAME_INVALID);
 	status = smbcli_chkpath(cli_dos->tree, "<");
-	CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS, ERRbadpath));
+	CHECK_STATUS(torture, status, NT_STATUS_DOS(ERRDOS, ERRbadpath));
 
 	status = smbcli_chkpath(cli_nt->tree, "<\\bla");
-	CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
+	CHECK_STATUS(torture, status, NT_STATUS_OBJECT_NAME_INVALID);
 	status = smbcli_chkpath(cli_dos->tree, "<\\bla");
-	CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS, ERRbadpath));
+	CHECK_STATUS(torture, status, NT_STATUS_DOS(ERRDOS, ERRbadpath));
 
 	/*
 	 * .... And the same gang against getatr. Note that the DOS error codes
@@ -469,95 +426,95 @@ bool torture_samba3_badpath(struct torture_context *torture)
 	 */
 
 	status = smbcli_getatr(cli_nt->tree, fpath, NULL, NULL, NULL);
-	CHECK_STATUS(status, NT_STATUS_OK);
+	CHECK_STATUS(torture, status, NT_STATUS_OK);
 	status = smbcli_getatr(cli_dos->tree, fpath, NULL, NULL, NULL);
-	CHECK_STATUS(status, NT_STATUS_OK);
+	CHECK_STATUS(torture, status, NT_STATUS_OK);
 
 	status = smbcli_getatr(cli_nt->tree, "..", NULL, NULL, NULL);
-	CHECK_STATUS(status, NT_STATUS_OBJECT_PATH_SYNTAX_BAD);
+	CHECK_STATUS(torture, status, NT_STATUS_OBJECT_PATH_SYNTAX_BAD);
 	status = smbcli_getatr(cli_dos->tree, "..", NULL, NULL, NULL);
-	CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS, ERRinvalidpath));
+	CHECK_STATUS(torture, status, NT_STATUS_DOS(ERRDOS, ERRinvalidpath));
 
 	status = smbcli_getatr(cli_nt->tree, ".", NULL, NULL, NULL);
-	CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
+	CHECK_STATUS(torture, status, NT_STATUS_OBJECT_NAME_INVALID);
 	status = smbcli_getatr(cli_dos->tree, ".", NULL, NULL, NULL);
-	CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS, ERRinvalidname));
+	CHECK_STATUS(torture, status, NT_STATUS_DOS(ERRDOS, ERRinvalidname));
 
 	status = smbcli_getatr(cli_nt->tree, "\t", NULL, NULL, NULL);
-	CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
+	CHECK_STATUS(torture, status, NT_STATUS_OBJECT_NAME_INVALID);
 	status = smbcli_getatr(cli_dos->tree, "\t", NULL, NULL, NULL);
-	CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS, ERRinvalidname));
+	CHECK_STATUS(torture, status, NT_STATUS_DOS(ERRDOS, ERRinvalidname));
 
 	status = smbcli_getatr(cli_nt->tree, "\t\\bla", NULL, NULL, NULL);
-	CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
+	CHECK_STATUS(torture, status, NT_STATUS_OBJECT_NAME_INVALID);
 	status = smbcli_getatr(cli_dos->tree, "\t\\bla", NULL, NULL, NULL);
-	CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS, ERRinvalidname));
+	CHECK_STATUS(torture, status, NT_STATUS_DOS(ERRDOS, ERRinvalidname));
 
 	status = smbcli_getatr(cli_nt->tree, "<", NULL, NULL, NULL);
-	CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
+	CHECK_STATUS(torture, status, NT_STATUS_OBJECT_NAME_INVALID);
 	status = smbcli_getatr(cli_dos->tree, "<", NULL, NULL, NULL);
-	CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS, ERRinvalidname));
+	CHECK_STATUS(torture, status, NT_STATUS_DOS(ERRDOS, ERRinvalidname));
 
 	status = smbcli_getatr(cli_nt->tree, "<\\bla", NULL, NULL, NULL);
-	CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
+	CHECK_STATUS(torture, status, NT_STATUS_OBJECT_NAME_INVALID);
 	status = smbcli_getatr(cli_dos->tree, "<\\bla", NULL, NULL, NULL);
-	CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS, ERRinvalidname));
+	CHECK_STATUS(torture, status, NT_STATUS_DOS(ERRDOS, ERRinvalidname));
 
 	/* Try the same set with openX. */
 
 	status = raw_smbcli_open(cli_nt->tree, "..", O_RDONLY, DENY_NONE, NULL);
-	CHECK_STATUS(status, NT_STATUS_OBJECT_PATH_SYNTAX_BAD);
+	CHECK_STATUS(torture, status, NT_STATUS_OBJECT_PATH_SYNTAX_BAD);
 	status = raw_smbcli_open(cli_dos->tree, "..", O_RDONLY, DENY_NONE, NULL);
-	CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS, ERRinvalidpath));
+	CHECK_STATUS(torture, status, NT_STATUS_DOS(ERRDOS, ERRinvalidpath));
 
 	status = raw_smbcli_open(cli_nt->tree, ".", O_RDONLY, DENY_NONE, NULL);
-	CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
+	CHECK_STATUS(torture, status, NT_STATUS_OBJECT_NAME_INVALID);
 	status = raw_smbcli_open(cli_dos->tree, ".", O_RDONLY, DENY_NONE, NULL);
-	CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS, ERRinvalidname));
+	CHECK_STATUS(torture, status, NT_STATUS_DOS(ERRDOS, ERRinvalidname));
 
 	status = raw_smbcli_open(cli_nt->tree, "\t", O_RDONLY, DENY_NONE, NULL);
-	CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
+	CHECK_STATUS(torture, status, NT_STATUS_OBJECT_NAME_INVALID);
 	status = raw_smbcli_open(cli_dos->tree, "\t", O_RDONLY, DENY_NONE, NULL);
-	CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS, ERRinvalidname));
+	CHECK_STATUS(torture, status, NT_STATUS_DOS(ERRDOS, ERRinvalidname));
 
 	status = raw_smbcli_open(cli_nt->tree, "\t\\bla", O_RDONLY, DENY_NONE, NULL);
-	CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
+	CHECK_STATUS(torture, status, NT_STATUS_OBJECT_NAME_INVALID);
 	status = raw_smbcli_open(cli_dos->tree, "\t\\bla", O_RDONLY, DENY_NONE, NULL);
-	CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS, ERRinvalidname));
+	CHECK_STATUS(torture, status, NT_STATUS_DOS(ERRDOS, ERRinvalidname));
 
 	status = raw_smbcli_open(cli_nt->tree, "<", O_RDONLY, DENY_NONE, NULL);
-	CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
+	CHECK_STATUS(torture, status, NT_STATUS_OBJECT_NAME_INVALID);
 	status = raw_smbcli_open(cli_dos->tree, "<", O_RDONLY, DENY_NONE, NULL);
-	CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS, ERRinvalidname));
+	CHECK_STATUS(torture, status, NT_STATUS_DOS(ERRDOS, ERRinvalidname));
 
 	status = raw_smbcli_open(cli_nt->tree, "<\\bla", O_RDONLY, DENY_NONE, NULL);
-	CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
+	CHECK_STATUS(torture, status, NT_STATUS_OBJECT_NAME_INVALID);
 	status = raw_smbcli_open(cli_dos->tree, "<\\bla", O_RDONLY, DENY_NONE, NULL);
-	CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS, ERRinvalidname));
+	CHECK_STATUS(torture, status, NT_STATUS_DOS(ERRDOS, ERRinvalidname));
 
 	/* Let's test EEXIST error code mapping. */
 	status = raw_smbcli_open(cli_nt->tree, fpath, O_RDONLY | O_CREAT| O_EXCL, DENY_NONE, NULL);
-	CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_COLLISION);
+	CHECK_STATUS(torture, status, NT_STATUS_OBJECT_NAME_COLLISION);
 	status = raw_smbcli_open(cli_dos->tree, fpath, O_RDONLY | O_CREAT| O_EXCL, DENY_NONE, NULL);
-	CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS,ERRfilexists));
+	CHECK_STATUS(torture, status, NT_STATUS_DOS(ERRDOS,ERRfilexists));
 
 	status = raw_smbcli_t2open(cli_nt->tree, fpath, O_RDONLY | O_CREAT| O_EXCL, DENY_NONE, NULL);
 	if (!NT_STATUS_EQUAL(status, NT_STATUS_EAS_NOT_SUPPORTED)
 	    || !torture_setting_bool(torture, "samba3", false)) {
 		/* Against samba3, treat EAS_NOT_SUPPORTED as acceptable */
-		CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_COLLISION);
+		CHECK_STATUS(torture, status, NT_STATUS_OBJECT_NAME_COLLISION);
 	}
 	status = raw_smbcli_t2open(cli_dos->tree, fpath, O_RDONLY | O_CREAT| O_EXCL, DENY_NONE, NULL);
 	if (!NT_STATUS_EQUAL(status, NT_STATUS_DOS(ERRDOS,ERReasnotsupported))
 	    || !torture_setting_bool(torture, "samba3", false)) {
 		/* Against samba3, treat EAS_NOT_SUPPORTED as acceptable */
-		CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS,ERRfilexists));
+		CHECK_STATUS(torture, status, NT_STATUS_DOS(ERRDOS,ERRfilexists));
 	}
 
 	status = raw_smbcli_ntcreate(cli_nt->tree, fpath, NULL);
-	CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_COLLISION);
+	CHECK_STATUS(torture, status, NT_STATUS_OBJECT_NAME_COLLISION);
 	status = raw_smbcli_ntcreate(cli_dos->tree, fpath, NULL);
-	CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS,ERRfilexists));


-- 
Samba Shared Repository


More information about the samba-cvs mailing list