summaryrefslogtreecommitdiffstats
path: root/source/torture/torture_util.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-11-12 09:37:59 +0000
committerAndrew Tridgell <tridge@samba.org>2004-11-12 09:37:59 +0000
commit16fcef1d882e94e2aa7ab8bc9d6dfcdb25c15ef5 (patch)
tree60f820776d871b9ba0d97ab041a75437d8ef6c09 /source/torture/torture_util.c
parent8d930335fcd193a5a359a69253427edbc69714e6 (diff)
downloadsamba-16fcef1d882e94e2aa7ab8bc9d6dfcdb25c15ef5.tar.gz
samba-16fcef1d882e94e2aa7ab8bc9d6dfcdb25c15ef5.tar.xz
samba-16fcef1d882e94e2aa7ab8bc9d6dfcdb25c15ef5.zip
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.
Diffstat (limited to 'source/torture/torture_util.c')
-rw-r--r--source/torture/torture_util.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/torture/torture_util.c b/source/torture/torture_util.c
index 22aa9ffedd3..af8a1ca0650 100644
--- a/source/torture/torture_util.c
+++ b/source/torture/torture_util.c
@@ -25,6 +25,20 @@
/*
+ setup a directory ready for a test
+*/
+BOOL torture_setup_dir(struct smbcli_state *cli, const char *dname)
+{
+ smb_raw_exit(cli->session);
+ if (smbcli_deltree(cli->tree, dname) == -1 ||
+ NT_STATUS_IS_ERR(smbcli_mkdir(cli->tree, dname))) {
+ printf("Unable to setup %s - %s\n", dname, smbcli_errstr(cli->tree));
+ return False;
+ }
+ return True;
+}
+
+/*
create a directory, returning a handle to it
*/
int create_directory_handle(struct smbcli_tree *tree, const char *dname)