diff options
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/raw/raw.c | 5 | ||||
-rw-r--r-- | source4/torture/raw/setfileinfo.c | 26 |
2 files changed, 21 insertions, 10 deletions
diff --git a/source4/torture/raw/raw.c b/source4/torture/raw/raw.c index 138f263106..ada290f436 100644 --- a/source4/torture/raw/raw.c +++ b/source4/torture/raw/raw.c @@ -41,10 +41,7 @@ NTSTATUS torture_raw_init(void) torture_suite_add_1smb_test(suite, "QFSINFO", torture_raw_qfsinfo); torture_suite_add_1smb_test(suite, "QFILEINFO", torture_raw_qfileinfo); torture_suite_add_1smb_test(suite, "QFILEINFO-IPC", torture_raw_qfileinfo_pipe); - torture_suite_add_1smb_test(suite, "SFILEINFO", torture_raw_sfileinfo); - torture_suite_add_1smb_test(suite, "SFILEINFO-BUG", torture_raw_sfileinfo_bug); - torture_suite_add_1smb_test(suite, "SFILEINFO-RENAME", - torture_raw_sfileinfo_rename); + torture_suite_add_suite(suite, torture_raw_sfileinfo(suite)); torture_suite_add_suite(suite, torture_raw_search(suite)); torture_suite_add_1smb_test(suite, "CLOSE", torture_raw_close); torture_suite_add_1smb_test(suite, "OPEN", torture_raw_open); diff --git a/source4/torture/raw/setfileinfo.c b/source4/torture/raw/setfileinfo.c index 31c753300c..d2163629d7 100644 --- a/source4/torture/raw/setfileinfo.c +++ b/source4/torture/raw/setfileinfo.c @@ -29,8 +29,8 @@ for each call we test that it succeeds, and where possible test for consistency between the calls. */ -bool torture_raw_sfileinfo(struct torture_context *torture, - struct smbcli_state *cli) +static bool +torture_raw_sfileinfo_base(struct torture_context *torture, struct smbcli_state *cli) { bool ret = true; int fnum = -1; @@ -442,8 +442,9 @@ done: /* * basic testing of all RAW_SFILEINFO_RENAME call */ -bool torture_raw_sfileinfo_rename(struct torture_context *torture, - struct smbcli_state *cli) +static bool +torture_raw_sfileinfo_rename(struct torture_context *torture, + struct smbcli_state *cli) { bool ret = true; int fnum_saved, d_fnum, fnum2, fnum = -1; @@ -669,8 +670,8 @@ done: /* look for the w2k3 setpathinfo STANDARD bug */ -bool torture_raw_sfileinfo_bug(struct torture_context *torture, - struct smbcli_state *cli) +static bool torture_raw_sfileinfo_bug(struct torture_context *torture, + struct smbcli_state *cli) { const char *fname = "\\bug3.txt"; union smb_setfileinfo sfinfo; @@ -698,3 +699,16 @@ bool torture_raw_sfileinfo_bug(struct torture_context *torture, return true; } + +struct torture_suite *torture_raw_sfileinfo(TALLOC_CTX *mem_ctx) +{ + struct torture_suite *suite = torture_suite_create(mem_ctx, + "SFILEINFO"); + + torture_suite_add_1smb_test(suite, "BASE", torture_raw_sfileinfo_base); + torture_suite_add_1smb_test(suite, "RENAME", + torture_raw_sfileinfo_rename); + torture_suite_add_1smb_test(suite, "BUG", torture_raw_sfileinfo_bug); + + return suite; +} |