diff options
author | Volker Lendecke <vl@samba.org> | 2012-04-18 14:45:20 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2012-04-18 18:16:27 +0200 |
commit | 1bb7d251763b8b2e87ed6401d638bb9109ceeb26 (patch) | |
tree | 2a7905356ef8b065e3ee2700cb160256f027923d /source4/torture/raw | |
parent | 0021fc17e4660eee8df98c5a5810a55e5e5effee (diff) | |
download | samba-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.c | 19 |
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, ¬ify); 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, ¬ify); 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); |