diff options
author | Volker Lendecke <vl@samba.org> | 2012-04-18 12:19:12 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2012-04-18 13:42:13 +0200 |
commit | 74f134df721b323a5b26bfa813528b32520785a6 (patch) | |
tree | 8db5d28016b455645ebaa8abfcc18e8b4fe39fb0 /source4/torture | |
parent | 13666857f20d4bfe57ae40fda575075811d9653f (diff) | |
download | samba-74f134df721b323a5b26bfa813528b32520785a6.tar.gz samba-74f134df721b323a5b26bfa813528b32520785a6.tar.bz2 samba-74f134df721b323a5b26bfa813528b32520785a6.zip |
s4-torture: Separate out the notify dir subtest
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/raw/notify.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source4/torture/raw/notify.c b/source4/torture/raw/notify.c index 6375da7baa..a41630cbde 100644 --- a/source4/torture/raw/notify.c +++ b/source4/torture/raw/notify.c @@ -63,8 +63,9 @@ do { \ /* basic testing of change notify on directories */ -static bool test_notify_dir(struct smbcli_state *cli, struct smbcli_state *cli2, - TALLOC_CTX *mem_ctx) +static bool test_notify_dir(struct torture_context *mem_ctx, + struct smbcli_state *cli, + struct smbcli_state *cli2) { bool ret = true; NTSTATUS status; @@ -77,6 +78,10 @@ static bool test_notify_dir(struct smbcli_state *cli, struct smbcli_state *cli2, printf("TESTING CHANGE NOTIFY ON DIRECTORIES\n"); + if (!torture_setup_dir(cli, BASEDIR)) { + return false; + } + /* get a handle on the directory */ @@ -265,6 +270,7 @@ static bool test_notify_dir(struct smbcli_state *cli, struct smbcli_state *cli2, done: smb_raw_exit(cli->session); + smbcli_deltree(cli->tree, BASEDIR); return ret; } @@ -1710,7 +1716,6 @@ static bool test_raw_notify_all(struct torture_context *torture, return false; } - ret &= test_notify_dir(cli, cli2, torture); ret &= test_notify_mask(cli, torture); ret &= test_notify_recursive(cli, torture); ret &= test_notify_mask_change(cli, torture); @@ -1735,6 +1740,7 @@ struct torture_suite *torture_raw_notify(TALLOC_CTX *mem_ctx) struct torture_suite *suite = torture_suite_create(mem_ctx, "notify"); torture_suite_add_1smb_test(suite, "tcon", test_notify_tcon); + torture_suite_add_2smb_test(suite, "dir", test_notify_dir); torture_suite_add_2smb_test(suite, "all", test_raw_notify_all); return suite; |