summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2013-08-22 11:47:21 +0000
committerJeremy Allison <jra@samba.org>2013-08-23 20:53:12 +0200
commit3ddb77f7d8d56376661c9ad26acbb32dc7e6e40d (patch)
tree196556c769a7c08f35408e5b2c6a231f6875574f
parente1edffc8075cc0f83e0f05153712298a96063fba (diff)
downloadsamba-3ddb77f7d8d56376661c9ad26acbb32dc7e6e40d.tar.gz
samba-3ddb77f7d8d56376661c9ad26acbb32dc7e6e40d.tar.bz2
samba-3ddb77f7d8d56376661c9ad26acbb32dc7e6e40d.zip
torture: Split the fsinfo check into a separate test
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Aug 23 20:53:12 CEST 2013 on sn-devel-104
-rw-r--r--selftest/knownfail1
-rw-r--r--source4/torture/smb2/getinfo.c10
2 files changed, 9 insertions, 2 deletions
diff --git a/selftest/knownfail b/selftest/knownfail
index 1c1bff8d3e..dd536df57a 100644
--- a/selftest/knownfail
+++ b/selftest/knownfail
@@ -207,6 +207,7 @@
^samba3.smb2.streams.rename2
^samba3.smb2.streams.attributes
^samba3.smb2.getinfo.complex
+^samba3.smb2.getinfo.fsinfo # quotas don't work yet
^samba3.smb2.setinfo.setinfo
^samba3.smb2.session.*reauth5 # some special anonymous checks?
^samba3.smb2.compound.interim2 # wrong return code (STATUS_CANCELLED)
diff --git a/source4/torture/smb2/getinfo.c b/source4/torture/smb2/getinfo.c
index 7e37c88aaa..10dd550cdd 100644
--- a/source4/torture/smb2/getinfo.c
+++ b/source4/torture/smb2/getinfo.c
@@ -127,13 +127,19 @@ static bool torture_smb2_fileinfo(struct torture_context *tctx, struct smb2_tree
/*
test fsinfo levels
*/
-static bool torture_smb2_fsinfo(struct torture_context *tctx, struct smb2_tree *tree)
+static bool torture_smb2_fsinfo(struct torture_context *tctx)
{
+ bool ret;
+ struct smb2_tree *tree;
int i;
NTSTATUS status;
struct smb2_handle handle;
printf("Testing fsinfo levels\n");
+
+ ret = torture_smb2_connection(tctx, &tree);
+ torture_assert(tctx, ret, "connection failed");
+
status = smb2_util_roothandle(tree, &handle);
torture_assert_ntstatus_ok(tctx, status, "Unable to create root handle");
@@ -214,7 +220,6 @@ static bool torture_smb2_getinfo(struct torture_context *torture)
"setup complex dir " DNAME ":streamtwo");
ret &= torture_smb2_fileinfo(torture, tree);
- ret &= torture_smb2_fsinfo(torture, tree);
return ret;
}
@@ -225,6 +230,7 @@ struct torture_suite *torture_smb2_getinfo_init(void)
talloc_autofree_context(), "getinfo");
torture_suite_add_simple_test(suite, "complex", torture_smb2_getinfo);
+ torture_suite_add_simple_test(suite, "fsinfo", torture_smb2_fsinfo);
torture_suite_add_simple_test(suite, "buffercheck",
torture_smb2_buffercheck);
return suite;