From 13666857f20d4bfe57ae40fda575075811d9653f Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 18 Apr 2012 11:47:48 +0200 Subject: s4-torture: Separate out the notify tcon subtest --- source4/torture/raw/notify.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source4/torture/raw/notify.c b/source4/torture/raw/notify.c index cac4b46e07..6375da7baa 100644 --- a/source4/torture/raw/notify.c +++ b/source4/torture/raw/notify.c @@ -1476,7 +1476,8 @@ static struct smbcli_tree *secondary_tcon(struct smbcli_state *cli, /* very simple change notify test */ -static bool test_notify_tcon(struct smbcli_state *cli, struct torture_context *torture) +static bool test_notify_tcon(struct torture_context *torture, + struct smbcli_state *cli) { bool ret = true; NTSTATUS status; @@ -1489,6 +1490,10 @@ static bool test_notify_tcon(struct smbcli_state *cli, struct torture_context *t printf("TESTING SIMPLE CHANGE NOTIFY\n"); + if (!torture_setup_dir(cli, BASEDIR)) { + return false; + } + /* get a handle on the directory */ @@ -1598,6 +1603,7 @@ static bool test_notify_tcon(struct smbcli_state *cli, struct torture_context *t printf("CHANGE NOTIFY WITH TDIS OK\n"); done: smb_raw_exit(cli->session); + smbcli_deltree(cli->tree, BASEDIR); return ret; } @@ -1704,7 +1710,6 @@ static bool test_raw_notify_all(struct torture_context *torture, return false; } - ret &= test_notify_tcon(cli, torture); ret &= test_notify_dir(cli, cli2, torture); ret &= test_notify_mask(cli, torture); ret &= test_notify_recursive(cli, torture); @@ -1729,6 +1734,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, "all", test_raw_notify_all); return suite; -- cgit