summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2018-10-15 15:39:12 +0200
committerKarolin Seeger <kseeger@samba.org>2018-11-06 09:10:23 +0100
commitf2c7d60a64a21ff8ebd2abb0316bda48ef0a3fde (patch)
treef11f6d5730cd340c10881b56b0702292979bd49f /source4/torture
parent2fcc620a77455c413451800d33f07871956b4831 (diff)
downloadsamba-f2c7d60a64a21ff8ebd2abb0316bda48ef0a3fde.tar.gz
s4:torture/vfs/fruit: update test "stream names" to work with macOS
o create the basefile before trying to create a stream on it, otherwise this fails on macOS o write something to the stream, otherwise the stream is not listed as macOS hides 0-byte sized streams Bug: https://bugzilla.samba.org/show_bug.cgi?id=13646 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 125498861abeeed5bde727ff98d88d9ce4af6c75)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/vfs/fruit.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/torture/vfs/fruit.c b/source4/torture/vfs/fruit.c
index f563fb87643..0750026f1d5 100644
--- a/source4/torture/vfs/fruit.c
+++ b/source4/torture/vfs/fruit.c
@@ -3132,6 +3132,9 @@ static bool test_stream_names(struct torture_context *tctx,
CHECK_STATUS(status, NT_STATUS_OK);
smb2_util_close(tree, h);
+ ret = torture_setup_file(mem_ctx, tree, fname, false);
+ torture_assert_goto(tctx, ret, ret, done, "torture_setup_file");
+
torture_comment(tctx, "(%s) testing stream names\n", __location__);
ZERO_STRUCT(create);
create.in.desired_access = SEC_FILE_WRITE_DATA;
@@ -3146,6 +3149,11 @@ static bool test_stream_names(struct torture_context *tctx,
status = smb2_create(tree, mem_ctx, &create);
CHECK_STATUS(status, NT_STATUS_OK);
+
+ status = smb2_util_write(tree, create.out.file.handle, "foo", 0, 3);
+ torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
+ "smb2_util_write failed\n");
+
smb2_util_close(tree, create.out.file.handle);
ret = check_stream_list(tree, tctx, fname, 2, streams, false);