summaryrefslogtreecommitdiff
path: root/source4/torture/raw
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-04-18 12:56:39 +0200
committerVolker Lendecke <vl@samba.org>2012-04-18 13:42:14 +0200
commitbd3ceb879252b5992be5d88c8d2694a7e3d36ff4 (patch)
tree71daaaaafcb95bea161f91cd921f610734892608 /source4/torture/raw
parent6b445cdfc6c8767f8e09ee847f5840ab0e20031b (diff)
downloadsamba-bd3ceb879252b5992be5d88c8d2694a7e3d36ff4.tar.gz
samba-bd3ceb879252b5992be5d88c8d2694a7e3d36ff4.tar.bz2
samba-bd3ceb879252b5992be5d88c8d2694a7e3d36ff4.zip
s4-torture: Separate out the notify alignment subtest
Diffstat (limited to 'source4/torture/raw')
-rw-r--r--source4/torture/raw/notify.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/source4/torture/raw/notify.c b/source4/torture/raw/notify.c
index 37723ac79d..29fff3bb04 100644
--- a/source4/torture/raw/notify.c
+++ b/source4/torture/raw/notify.c
@@ -1688,8 +1688,8 @@ done:
/*
testing alignment of multiple change notify infos
*/
-static bool test_notify_alignment(struct smbcli_state *cli,
- struct torture_context *tctx)
+static bool test_notify_alignment(struct torture_context *tctx,
+ struct smbcli_state *cli)
{
NTSTATUS status;
union smb_notify notify;
@@ -1706,6 +1706,10 @@ static bool test_notify_alignment(struct smbcli_state *cli,
torture_comment(tctx, "TESTING CHANGE NOTIFY REPLY ALIGNMENT\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;
@@ -1771,6 +1775,8 @@ static bool test_notify_alignment(struct smbcli_state *cli,
STR_UNICODE);
}
+ smb_raw_exit(cli->session);
+ smbcli_deltree(cli->tree, BASEDIR);
return true;
}
@@ -1787,8 +1793,6 @@ static bool test_raw_notify_all(struct torture_context *torture,
return false;
}
- ret &= test_notify_alignment(cli, torture);
-
smb_raw_exit(cli->session);
smbcli_deltree(cli->tree, BASEDIR);
return ret;
@@ -1813,6 +1817,7 @@ struct torture_suite *torture_raw_notify(TALLOC_CTX *mem_ctx)
torture_suite_add_1smb_test(suite, "tree", test_notify_tree);
torture_suite_add_1smb_test(suite, "overflow", test_notify_overflow);
torture_suite_add_1smb_test(suite, "basedir", test_notify_basedir);
+ torture_suite_add_1smb_test(suite, "alignment", test_notify_alignment);
torture_suite_add_2smb_test(suite, "all", test_raw_notify_all);
return suite;