{ "b", "RWD", true },
};
-static bool test_one_durable_open_open1(struct torture_context *tctx,
- struct smb2_tree *tree,
- const char *fname,
- struct durable_open_vs_oplock test)
+static bool test_one_durable_open_open_oplock(struct torture_context *tctx,
+ struct smb2_tree *tree,
+ const char *fname,
+ struct durable_open_vs_oplock test)
{
NTSTATUS status;
TALLOC_CTX *mem_ctx = talloc_new(tctx);
return ret;
}
-bool test_durable_open_open1(struct torture_context *tctx,
- struct smb2_tree *tree)
+bool test_durable_open_open_oplock(struct torture_context *tctx,
+ struct smb2_tree *tree)
{
TALLOC_CTX *mem_ctx = talloc_new(tctx);
char fname[256];
int i;
/* Choose a random name in case the state is left a little funky. */
- snprintf(fname, 256, "durable_open_open1_%s.dat", generate_random_str(tctx, 8));
+ snprintf(fname, 256, "durable_open_open_oplock_%s.dat", generate_random_str(tctx, 8));
smb2_util_unlink(tree, fname);
/* test various oplock levels with durable open */
for (i = 0; i < NUM_OPLOCK_OPEN_TESTS; i++) {
- ret = test_one_durable_open_open1(tctx,
- tree,
- fname,
- durable_open_vs_oplock_table[i]);
+ ret = test_one_durable_open_open_oplock(tctx,
+ tree,
+ fname,
+ durable_open_vs_oplock_table[i]);
if (ret == false) {
goto done;
}
{ "RHW", "RWD", true },
};
-static bool test_one_durable_open_open2(struct torture_context *tctx,
- struct smb2_tree *tree,
- const char *fname,
- struct durable_open_vs_lease test)
+static bool test_one_durable_open_open_lease(struct torture_context *tctx,
+ struct smb2_tree *tree,
+ const char *fname,
+ struct durable_open_vs_lease test)
{
NTSTATUS status;
TALLOC_CTX *mem_ctx = talloc_new(tctx);
return ret;
}
-bool test_durable_open_open2(struct torture_context *tctx,
- struct smb2_tree *tree)
+bool test_durable_open_open_lease(struct torture_context *tctx,
+ struct smb2_tree *tree)
{
TALLOC_CTX *mem_ctx = talloc_new(tctx);
char fname[256];
}
/* Choose a random name in case the state is left a little funky. */
- snprintf(fname, 256, "durable_open_open2_%s.dat", generate_random_str(tctx, 8));
+ snprintf(fname, 256, "durable_open_open_lease_%s.dat", generate_random_str(tctx, 8));
smb2_util_unlink(tree, fname);
/* test various oplock levels with durable open */
for (i = 0; i < NUM_LEASE_OPEN_TESTS; i++) {
- ret = test_one_durable_open_open2(tctx,
- tree,
- fname,
- durable_open_vs_lease_table[i]);
+ ret = test_one_durable_open_open_lease(tctx,
+ tree,
+ fname,
+ durable_open_vs_lease_table[i]);
if (ret == false) {
goto done;
}
* reconnect after an open, the oplock/lease tests above will certainly
* demonstrate an error on reconnect.
*/
-bool test_durable_open_open_lease(struct torture_context *tctx,
+bool test_durable_open_open2_lease(struct torture_context *tctx,
struct smb2_tree *tree1,
struct smb2_tree *tree2)
{
* little funky.
*/
lease = random();
- snprintf(fname, 256, "durable_open_open_lease_%s.dat",
+ snprintf(fname, 256, "durable_open_open2_lease_%s.dat",
generate_random_str(tctx, 8));
/* Clean slate */
* reconnect after an open, the oplock/lease tests above will certainly
* demonstrate an error on reconnect.
*/
-bool test_durable_open_open_oplock(struct torture_context *tctx,
- struct smb2_tree *tree1,
- struct smb2_tree *tree2)
+bool test_durable_open_open2_oplock(struct torture_context *tctx,
+ struct smb2_tree *tree1,
+ struct smb2_tree *tree2)
{
TALLOC_CTX *mem_ctx = talloc_new(tctx);
struct smb2_create io1, io2;
* Choose a random name and random lease in case the state is left a
* little funky.
*/
- snprintf(fname, 256, "durable_open_open_oplock_%s.dat",
+ snprintf(fname, 256, "durable_open_open2_oplock_%s.dat",
generate_random_str(tctx, 8));
/* Clean slate */
struct torture_suite *suite =
torture_suite_create(talloc_autofree_context(), "durable-open");
- torture_suite_add_1smb2_test(suite, "open1", test_durable_open_open1);
- torture_suite_add_1smb2_test(suite, "open2", test_durable_open_open2);
+ torture_suite_add_1smb2_test(suite, "open-oplock", test_durable_open_open_oplock);
+ torture_suite_add_1smb2_test(suite, "open-lease", test_durable_open_open_lease);
torture_suite_add_1smb2_test(suite, "reopen1", test_durable_open_reopen1);
torture_suite_add_1smb2_test(suite, "reopen2", test_durable_open_reopen2);
torture_suite_add_1smb2_test(suite, "reopen2a", test_durable_open_reopen2a);
torture_suite_add_2smb2_test(suite, "oplock", test_durable_open_oplock);
torture_suite_add_2smb2_test(suite, "lease", test_durable_open_lease);
torture_suite_add_1smb2_test(suite, "lock", test_durable_open_lock);
- torture_suite_add_2smb2_test(suite, "open-lease",
- test_durable_open_open_lease);
- torture_suite_add_2smb2_test(suite, "open-oplock",
- test_durable_open_open_oplock);
+ torture_suite_add_2smb2_test(suite, "open2-lease",
+ test_durable_open_open2_lease);
+ torture_suite_add_2smb2_test(suite, "open2-oplock",
+ test_durable_open_open2_oplock);
suite->description = talloc_strdup(suite, "SMB2-DURABLE-OPEN tests");