summaryrefslogtreecommitdiff
path: root/source4/torture/raw
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture/raw')
-rw-r--r--source4/torture/raw/eas.c31
1 files changed, 29 insertions, 2 deletions
diff --git a/source4/torture/raw/eas.c b/source4/torture/raw/eas.c
index cbe89926da..1fec54b38a 100644
--- a/source4/torture/raw/eas.c
+++ b/source4/torture/raw/eas.c
@@ -35,7 +35,7 @@
goto done; \
}} while (0)
-static BOOL maxeadebug = 0; /* need that here, to allow no file delete in debug case */
+static BOOL maxeadebug; /* need that here, to allow no file delete in debug case */
static BOOL check_ea(struct smbcli_state *cli,
const char *fname, const char *eaname, const char *value)
@@ -460,11 +460,38 @@ BOOL torture_raw_eas(void)
return False;
}
- ret &= test_max_eas(cli, mem_ctx);
ret &= test_eas(cli, mem_ctx);
ret &= test_nttrans_create(cli, mem_ctx);
smb_raw_exit(cli->session);
+
+ torture_close_connection(cli);
+ talloc_free(mem_ctx);
+ return ret;
+}
+
+/*
+ test max EA size
+*/
+BOOL torture_max_eas(void)
+{
+ struct smbcli_state *cli;
+ BOOL ret = True;
+ TALLOC_CTX *mem_ctx;
+
+ if (!torture_open_connection(&cli)) {
+ return False;
+ }
+
+ mem_ctx = talloc_init("torture_raw_eas");
+
+ if (!torture_setup_dir(cli, BASEDIR)) {
+ return False;
+ }
+
+ ret &= test_max_eas(cli, mem_ctx);
+
+ smb_raw_exit(cli->session);
if (!maxeadebug) {
/* in no ea debug case, all files are gone now */
smbcli_deltree(cli->tree, BASEDIR);