From 0e255bb542b1f79c32e9295617199ea8d60753d4 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 12 Nov 2004 09:37:59 +0000 Subject: r3699: - split the delayed write testing out of RAW-WRITE, as it is not yet clear what the correct behaviour is for delayed stat info update. - use a common torture_setup_dir() function for setting up a test directory in torture tests. (This used to be commit f7fb34715b7d6ea3c35ddd684cfb27459a420339) --- source4/torture/raw/lock.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) (limited to 'source4/torture/raw/lock.c') diff --git a/source4/torture/raw/lock.c b/source4/torture/raw/lock.c index 034c793260..547115c9f5 100644 --- a/source4/torture/raw/lock.c +++ b/source4/torture/raw/lock.c @@ -52,9 +52,7 @@ static BOOL test_lock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) int fnum; const char *fname = BASEDIR "\\test.txt"; - if (smbcli_deltree(cli->tree, BASEDIR) == -1 || - NT_STATUS_IS_ERR(smbcli_mkdir(cli->tree, BASEDIR))) { - printf("Unable to setup %s - %s\n", BASEDIR, smbcli_errstr(cli->tree)); + if (!torture_setup_dir(cli, BASEDIR)) { return False; } @@ -190,9 +188,7 @@ static BOOL test_lockx(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) int fnum; const char *fname = BASEDIR "\\test.txt"; - if (smbcli_deltree(cli->tree, BASEDIR) == -1 || - NT_STATUS_IS_ERR(smbcli_mkdir(cli->tree, BASEDIR))) { - printf("Unable to setup %s - %s\n", BASEDIR, smbcli_errstr(cli->tree)); + if (!torture_setup_dir(cli, BASEDIR)) { return False; } @@ -372,9 +368,7 @@ static BOOL test_pidhigh(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) const char *fname = BASEDIR "\\test.txt"; char c = 1; - if (smbcli_deltree(cli->tree, BASEDIR) == -1 || - NT_STATUS_IS_ERR(smbcli_mkdir(cli->tree, BASEDIR))) { - printf("Unable to setup %s - %s\n", BASEDIR, smbcli_errstr(cli->tree)); + if (!torture_setup_dir(cli, BASEDIR)) { return False; } @@ -456,9 +450,7 @@ static BOOL test_async(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) time_t t; struct smbcli_request *req; - if (smbcli_deltree(cli->tree, BASEDIR) == -1 || - NT_STATUS_IS_ERR(smbcli_mkdir(cli->tree, BASEDIR))) { - printf("Unable to setup %s - %s\n", BASEDIR, smbcli_errstr(cli->tree)); + if (!torture_setup_dir(cli, BASEDIR)) { return False; } @@ -609,9 +601,7 @@ static BOOL test_changetype(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) char c = 0; const char *fname = BASEDIR "\\test.txt"; - if (smbcli_deltree(cli->tree, BASEDIR) == -1 || - NT_STATUS_IS_ERR(smbcli_mkdir(cli->tree, BASEDIR))) { - printf("Unable to setup %s - %s\n", BASEDIR, smbcli_errstr(cli->tree)); + if (!torture_setup_dir(cli, BASEDIR)) { return False; } -- cgit