1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-20 22:50:26 +03:00

s4:torture:vfs_fruit: use AFPINFO_STREAM_NAME

I got erratic results from OS X SMB server with AFPINFO_STREAM
(":AFP_AfpInfo:$DATA") in some tests. Using AFPINFO_STREAM_NAME
(just the ":AFP_AfpInfo" part) instead fixed this.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=11347

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 8694da43442abe3ae6ac3b6a16c524e455ae1a65)
This commit is contained in:
Ralph Boehme 2015-12-17 16:51:10 +01:00 committed by Karolin Seeger
parent 7fb83716ea
commit eb5df33210

View File

@ -849,7 +849,7 @@ static bool torture_write_afpinfo(struct smb2_tree *tree,
char *infobuf;
bool ret = true;
full_name = talloc_asprintf(mem_ctx, "%s%s", fname, AFPINFO_STREAM);
full_name = talloc_asprintf(mem_ctx, "%s%s", fname, AFPINFO_STREAM_NAME);
if (full_name == NULL) {
torture_comment(tctx, "talloc_asprintf error\n");
return false;
@ -1362,7 +1362,7 @@ static bool test_write_atalk_rfork_io(struct torture_context *tctx,
{
TALLOC_CTX *mem_ctx = talloc_new(tctx);
const char *fname = BASEDIR "\\torture_write_rfork_io";
const char *rfork = BASEDIR "\\torture_write_rfork_io" AFPRESOURCE_STREAM;
const char *rfork = BASEDIR "\\torture_write_rfork_io" AFPRESOURCE_STREAM_NAME;
const char *rfork_content = "1234567890";
NTSTATUS status;
struct smb2_handle testdirh;
@ -1388,11 +1388,11 @@ static bool test_write_atalk_rfork_io(struct torture_context *tctx,
__location__);
ret &= write_stream(tree, __location__, tctx, mem_ctx,
fname, AFPRESOURCE_STREAM,
fname, AFPRESOURCE_STREAM_NAME,
10, 10, rfork_content);
ret &= check_stream(tree, __location__, tctx, mem_ctx,
fname, AFPRESOURCE_STREAM,
fname, AFPRESOURCE_STREAM_NAME,
0, 20, 10, 10, rfork_content);
/* Check size after write */
@ -1430,11 +1430,11 @@ static bool test_write_atalk_rfork_io(struct torture_context *tctx,
__location__);
ret &= write_stream(tree, __location__, tctx, mem_ctx,
fname, AFPRESOURCE_STREAM,
fname, AFPRESOURCE_STREAM_NAME,
(off_t)1<<32, 10, rfork_content);
ret &= check_stream(tree, __location__, tctx, mem_ctx,
fname, AFPRESOURCE_STREAM,
fname, AFPRESOURCE_STREAM_NAME,
(off_t)1<<32, 10, 0, 10, rfork_content);
/* Truncate back to size of 1 byte */
@ -1938,7 +1938,7 @@ static bool test_aapl(struct torture_context *tctx,
}
ret = write_stream(tree, __location__, tctx, mem_ctx,
fname, AFPRESOURCE_STREAM,
fname, AFPRESOURCE_STREAM_NAME,
0, 3, "foo");
if (ret == false) {
torture_result(tctx, TORTURE_FAIL,