summaryrefslogtreecommitdiff
path: root/source4/torture/raw
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-04-18 14:45:20 +0200
committerVolker Lendecke <vl@samba.org>2012-04-18 18:16:27 +0200
commit1bb7d251763b8b2e87ed6401d638bb9109ceeb26 (patch)
tree2a7905356ef8b065e3ee2700cb160256f027923d /source4/torture/raw
parent0021fc17e4660eee8df98c5a5810a55e5e5effee (diff)
downloadsamba-1bb7d251763b8b2e87ed6401d638bb9109ceeb26.tar.gz
samba-1bb7d251763b8b2e87ed6401d638bb9109ceeb26.tar.bz2
samba-1bb7d251763b8b2e87ed6401d638bb9109ceeb26.zip
s4-torture: Use 2 client connections for raw.notify.recursive
This makes the test more interesting in a cluster
Diffstat (limited to 'source4/torture/raw')
-rw-r--r--source4/torture/raw/notify.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/source4/torture/raw/notify.c b/source4/torture/raw/notify.c
index e56900054f..1394aaaaa6 100644
--- a/source4/torture/raw/notify.c
+++ b/source4/torture/raw/notify.c
@@ -310,7 +310,8 @@ static bool check_rename_reply(struct smbcli_state *cli,
testing of recursive change notify
*/
static bool test_notify_recursive(struct torture_context *mem_ctx,
- struct smbcli_state *cli)
+ struct smbcli_state *cli,
+ struct smbcli_state *cli2)
{
bool ret = true;
NTSTATUS status;
@@ -367,13 +368,19 @@ static bool test_notify_recursive(struct torture_context *mem_ctx,
status = smb_raw_changenotify_recv(req2, mem_ctx, &notify);
CHECK_STATUS(status, NT_STATUS_CANCELLED);
+ /*
+ * Make notifies a bit more interesting in a cluster by doing
+ * the changes against different nodes with --unclist
+ */
smbcli_mkdir(cli->tree, BASEDIR "\\subdir-name");
- smbcli_mkdir(cli->tree, BASEDIR "\\subdir-name\\subname1");
+ smbcli_mkdir(cli2->tree, BASEDIR "\\subdir-name\\subname1");
smbcli_close(cli->tree,
smbcli_open(cli->tree, BASEDIR "\\subdir-name\\subname2", O_CREAT, 0));
- smbcli_rename(cli->tree, BASEDIR "\\subdir-name\\subname1", BASEDIR "\\subdir-name\\subname1-r");
+ smbcli_rename(cli2->tree, BASEDIR "\\subdir-name\\subname1",
+ BASEDIR "\\subdir-name\\subname1-r");
smbcli_rename(cli->tree, BASEDIR "\\subdir-name\\subname2", BASEDIR "\\subname2-r");
- smbcli_rename(cli->tree, BASEDIR "\\subname2-r", BASEDIR "\\subname3-r");
+ smbcli_rename(cli2->tree, BASEDIR "\\subname2-r",
+ BASEDIR "\\subname3-r");
notify.nttrans.in.completion_filter = 0;
notify.nttrans.in.recursive = true;
@@ -381,7 +388,7 @@ static bool test_notify_recursive(struct torture_context *mem_ctx,
req1 = smb_raw_changenotify_send(cli->tree, &notify);
smbcli_rmdir(cli->tree, BASEDIR "\\subdir-name\\subname1-r");
- smbcli_rmdir(cli->tree, BASEDIR "\\subdir-name");
+ smbcli_rmdir(cli2->tree, BASEDIR "\\subdir-name");
smbcli_unlink(cli->tree, BASEDIR "\\subname3-r");
notify.nttrans.in.recursive = false;
@@ -1787,7 +1794,7 @@ struct torture_suite *torture_raw_notify(TALLOC_CTX *mem_ctx)
torture_suite_add_1smb_test(suite, "tcon", test_notify_tcon);
torture_suite_add_2smb_test(suite, "dir", test_notify_dir);
torture_suite_add_1smb_test(suite, "mask", test_notify_mask);
- torture_suite_add_1smb_test(suite, "recursive", test_notify_recursive);
+ torture_suite_add_2smb_test(suite, "recursive", test_notify_recursive);
torture_suite_add_1smb_test(suite, "mask_change",
test_notify_mask_change);
torture_suite_add_1smb_test(suite, "file", test_notify_file);