#define BASEDIR "test_rename"
-/*
- * basic testing of rename: open file with DELETE access
- * this should pass
+/**
+ * Testcase smb2.rename.simple
+ *
+ * Basic testing of rename: open file with DELETE access. This should
+ * pass.
+ *
+ * - Create base directory
+ * - Create test file with DELETE access
+ * - Rename testfile
+ *
+ * @ingroup smb2_rename
+ *
+ * @param torture torture context
+ * @param tree1 SMB2 tree context
+ *
+ * @return boolean Returns true if test succeeded, false if not.
*/
-
static bool torture_smb2_rename_simple(struct torture_context *torture,
struct smb2_tree *tree1)
{
return ret;
}
-/*
- * basic testing of rename, this time do not request DELETE access
- * for the file, this should fail
+/**
+ * Testcase smb2.rename.simple2
+ *
+ * Basic testing of rename, this time do not request DELETE access
+ * for the file, this should fail.
+ *
+ * - Create base directory
+ * - Create test file without DELETE access
+ * - Rename test file
+ * - Expect ACCESS_DENIED
+ *
+ * @ingroup smb2_rename
+ *
+ * @param torture torture context
+ * @param tree1 SMB2 tree context
+ *
+ * @return boolean Returns true if test succeeded, false if not.
*/
-
static bool torture_smb2_rename_simple2(struct torture_context *torture,
struct smb2_tree *tree1)
{
}
-/*
- * testing of rename with no sharing allowed on file
- * this should work
+/**
+ * Testcase smb2.rename_nosharing
+ *
+ * Testing of rename with no sharing allowed on file. This should work.
+ *
+ * - Create base directory
+ * - Create test file with exclusive access.
+ * - Rename test file
+ *
+ * @ingroup smb2_rename
+ *
+ * @param torture torture context
+ * @param tree1 SMB2 tree context
+ *
+ * @return boolean Returns true if test succeeded, false if not.
*/
-
static bool torture_smb2_rename_no_sharemode(struct torture_context *torture,
struct smb2_tree *tree1)
{
return ret;
}
-/*
- * testing of rename when opening parent dir with delete access and delete
- * sharing allowed
- * should result in sharing violation
+/**
+ * Testcase smb2.rename.share_delete_and_delete_access
+ *
+ * Testing of rename when opening parent dir with delete access and
+ * delete sharing allowed should result in sharing violation.
+ *
+ * - Create base directory
+ * - Open base directory with delete access and delete sharing
+ * - Create file
+ * - Rename file
+ * - Expect SHARING_VIOLATION
+ *
+ * @ingroup smb2_rename
+ *
+ * @param torture torture context
+ * @param tree1 SMB2 tree context
+ *
+ * @return boolean Returns true if test succeeded, false if not.
*/
-
static bool torture_smb2_rename_with_delete_access(struct torture_context *torture,
struct smb2_tree *tree1)
{
}
-/*
- * testing of rename with delete access on parent dir
- * this is a variation of the test above: parent dir is opened
- * without share_delete, so rename must fail
+/**
+ * Testcase smb2.rename.no_share_delete_but_delete_access
+ *
+ * Testing of rename with delete access on parent dir. This is a
+ * variation of the test above: parent dir is opened without
+ * share_delete, so rename must fail.
+ *
+ * @ingroup smb2_rename
+ *
+ * @param torture torture context
+ * @param tree1 SMB2 tree context
+ *
+ * @return boolean Returns true if test succeeded, false if not.
*/
-
static bool torture_smb2_rename_with_delete_access2(struct torture_context *torture,
struct smb2_tree *tree1)
{
return ret;
}
-/*
- * testing of rename when opening parent dir with no delete access and delete
- * sharing allowed
- * this should pass
+/**
+ * Testcase smb2.rename.share_delete_no_delete_access
+ *
+ * Testing of rename when opening parent dir with no delete access and delete
+ * sharing allowed. This should pass.
+ *
+ * @ingroup smb2_rename
+ *
+ * @param torture torture context
+ * @param tree1 SMB2 tree context
+ *
+ * @return boolean Returns true if test succeeded, false if not.
*/
-
static bool torture_smb2_rename_no_delete_access(struct torture_context *torture,
struct smb2_tree *tree1)
{
}
-/*
- * testing of rename with no delete access on parent dir
- * this is the negative case of the test above: parent dir is opened
- * without share_delete, so rename must fail
+/**
+ * Testcase smb2.rename.no_share_delete_no_delete_access
+ *
+ * Testing of rename with no delete access on parent dir. This is the
+ * negative case of the test above: Parent dir is opened without
+ * share_delete, so rename must fail.
+ *
+ * @ingroup smb2_rename
+ *
+ * @param torture torture context
+ * @param tree1 SMB2 tree context
+ *
+ * @return boolean Returns true if test succeeded, false if not.
*/
-
static bool torture_smb2_rename_no_delete_access2(struct torture_context *torture,
struct smb2_tree *tree1)
{
return ret;
}
-/*
- * this is a replay of how Word 2010 saves a file
- * this should pass
+/**
+ * Testcase smb2.rename.msword
+ *
+ * This is a replay of how Word 2010 saves a file this should pass.
+ *
+ * @ingroup smb2_rename
+ *
+ * @param torture torture context
+ * @param tree1 SMB2 tree context
+ *
+ * @return boolean Returns true if test succeeded, false if not.
*/
-
static bool torture_smb2_rename_msword(struct torture_context *torture,
struct smb2_tree *tree1)
{
return ret;
}
+/**
+ * Testcase smb2.rename.rename_dir_openfile
+ *
+ * Test renaming directory while file in directory is open. This
+ * should fail.
+ *
+ * @param torture torture context
+ * @param tree1 SMB2 tree context
+ *
+ * @return boolean Returns true if test succeeded, false if not.
+ */
static bool torture_smb2_rename_dir_openfile(struct torture_context *torture,
struct smb2_tree *tree1)
{
return tevent_req_simple_recv_ntstatus(req);
}
+/**
+ * Testcase smb2.rename.rename_dir_bench
+ *
+ * This is a little benchmark test excercising parallel directory
+ * renames. With lots of open files directory renames get pretty slow
+ * against some SMB server implementations.
+ *
+ * @param torture torture context
+ * @param tree1 SMB2 tree context
+ *
+ * @return boolean Returns true if test succeeded, false if not.
+ */
static bool torture_smb2_rename_dir_bench(struct torture_context *tctx,
struct smb2_tree *tree)
{
}
-/*
- basic testing of SMB2 rename
+/**
+ * @defgroup smb2_rename smb2.rename
+ *
+ * Basic testing of SMB2 rename
*/
struct torture_suite *torture_smb2_rename_init(void)
{