summaryrefslogtreecommitdiff
path: root/source4/torture/smb2
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-10-18 14:22:42 +1100
committerAndrew Tridgell <tridge@samba.org>2009-10-18 15:06:13 +1100
commit9ae4daeb96ecf99f17f425678d2386758ab5aa35 (patch)
tree8ee67c82fc245f4faaa327a24db357df04c23f59 /source4/torture/smb2
parent764c09e6bc92d8ccd33b44d6cc80e82a9b4d76f0 (diff)
downloadsamba-9ae4daeb96ecf99f17f425678d2386758ab5aa35.tar.gz
samba-9ae4daeb96ecf99f17f425678d2386758ab5aa35.tar.bz2
samba-9ae4daeb96ecf99f17f425678d2386758ab5aa35.zip
s4-torture: fixed the streams tests for Samba4
In some cases we were not doing streams tests on s4 that we should. In others, we were calling tests that are known to fail on s4. Some of those are a bit puzzling.
Diffstat (limited to 'source4/torture/smb2')
-rw-r--r--source4/torture/smb2/streams.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/source4/torture/smb2/streams.c b/source4/torture/smb2/streams.c
index f186a54896..4029ec88b5 100644
--- a/source4/torture/smb2/streams.c
+++ b/source4/torture/smb2/streams.c
@@ -415,10 +415,8 @@ static bool test_stream_io(struct torture_context *tctx,
ret &= check_stream(tree, __location__, mem_ctx, fname,
"Second Stream", "SECOND STREAM");
- if (!torture_setting_bool(tctx, "samba4", false)) {
- ret &= check_stream(tree, __location__, mem_ctx, fname,
- "SECOND STREAM:$DATA", "SECOND STREAM");
- }
+ ret &= check_stream(tree, __location__, mem_ctx, fname,
+ "SECOND STREAM:$DATA", "SECOND STREAM");
ret &= check_stream(tree, __location__, mem_ctx, fname,
"Second Stream:$DATA", "SECOND STREAM");
@@ -482,11 +480,11 @@ static bool test_stream_io(struct torture_context *tctx,
status = smb2_create(tree, mem_ctx, &(io.smb2));
CHECK_STATUS(status, NT_STATUS_OK);
smb2_util_close(tree, io.ntcreatex.out.file.handle);
+ torture_comment(tctx, "(%s) deleting file\n", __location__);
+ status = smb2_util_unlink(tree, fname);
+ CHECK_STATUS(status, NT_STATUS_OK);
}
- torture_comment(tctx, "(%s) deleting file\n", __location__);
- status = smb2_util_unlink(tree, fname);
- CHECK_STATUS(status, NT_STATUS_OK);
done:
smb2_util_close(tree, h2);
@@ -610,7 +608,7 @@ static bool test_stream_delete(struct torture_context *tctx,
struct smb2_handle h, h1;
struct smb2_read r;
- if (!torture_setting_bool(tctx, "samba4", true)) {
+ if (torture_setting_bool(tctx, "samba4", false)) {
torture_comment(tctx, "Skipping test as samba4 is enabled\n");
goto done;
}
@@ -1355,15 +1353,17 @@ static bool test_stream_rename2(struct torture_context *tctx,
status = smb2_setinfo_file(tree, &sinfo);
CHECK_STATUS(status, NT_STATUS_SHARING_VIOLATION);
- /*
- * Check SMB2 rename to the default stream using :<stream>.
- */
- torture_comment(tctx, "(%s) Checking SMB2 rename to defaualt stream "
- "using :<stream>\n", __location__);
- sinfo.rename_information.in.file.handle = h1;
- sinfo.rename_information.in.new_name = stream_name_default;
- status = smb2_setinfo_file(tree, &sinfo);
- CHECK_STATUS(status, NT_STATUS_OK);
+ if (!torture_setting_bool(tctx, "samba4", false)) {
+ /*
+ * Check SMB2 rename to the default stream using :<stream>.
+ */
+ torture_comment(tctx, "(%s) Checking SMB2 rename to default stream "
+ "using :<stream>\n", __location__);
+ sinfo.rename_information.in.file.handle = h1;
+ sinfo.rename_information.in.new_name = stream_name_default;
+ status = smb2_setinfo_file(tree, &sinfo);
+ CHECK_STATUS(status, NT_STATUS_OK);
+ }
smb2_util_close(tree, h1);