summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-04-18 12:53:08 +0200
committerVolker Lendecke <vl@samba.org>2012-04-18 13:42:14 +0200
commit98f8f4236c363fe9f97fd4fca154be9258b1652a (patch)
tree1d08c720b0160b17a985447ff7c4d0eaccf1ec4e /source4/torture
parenta7cff2b72e85b2bc919f1dcb30bd009a54d47354 (diff)
downloadsamba-98f8f4236c363fe9f97fd4fca154be9258b1652a.tar.gz
samba-98f8f4236c363fe9f97fd4fca154be9258b1652a.tar.bz2
samba-98f8f4236c363fe9f97fd4fca154be9258b1652a.zip
s4-torture: Separate out the notify overflow subtest
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/raw/notify.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source4/torture/raw/notify.c b/source4/torture/raw/notify.c
index 3ebdc0ce06..ae936f4d92 100644
--- a/source4/torture/raw/notify.c
+++ b/source4/torture/raw/notify.c
@@ -1360,7 +1360,8 @@ done:
Test response when cached server events exceed single NT NOTFIY response
packet size.
*/
-static bool test_notify_overflow(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
+static bool test_notify_overflow(struct torture_context *mem_ctx,
+ struct smbcli_state *cli)
{
bool ret = true;
NTSTATUS status;
@@ -1373,6 +1374,10 @@ static bool test_notify_overflow(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("TESTING CHANGE NOTIFY EVENT OVERFLOW\n");
+ if (!torture_setup_dir(cli, BASEDIR)) {
+ return false;
+ }
+
/* get a handle on the directory */
io.generic.level = RAW_OPEN_NTCREATEX;
io.ntcreatex.in.root_fid.fnum = 0;
@@ -1431,6 +1436,7 @@ static bool test_notify_overflow(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
done:
smb_raw_exit(cli->session);
+ smbcli_deltree(cli->tree, BASEDIR);
return ret;
}
@@ -1775,7 +1781,6 @@ static bool test_raw_notify_all(struct torture_context *torture,
return false;
}
- ret &= test_notify_overflow(cli, torture);
ret &= test_notify_basedir(cli, torture);
ret &= test_notify_alignment(cli, torture);
@@ -1801,6 +1806,7 @@ struct torture_suite *torture_raw_notify(TALLOC_CTX *mem_ctx)
torture_suite_add_1smb_test(suite, "tcp_dis", test_notify_tcp_dis);
torture_suite_add_1smb_test(suite, "double", test_notify_double);
torture_suite_add_1smb_test(suite, "tree", test_notify_tree);
+ torture_suite_add_1smb_test(suite, "overflow", test_notify_overflow);
torture_suite_add_2smb_test(suite, "all", test_raw_notify_all);
return suite;