diff options
author | Ralph Boehme <slow@samba.org> | 2017-11-17 12:57:14 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2017-11-29 04:35:25 +0100 |
commit | 7b00b558761b6564928289efcf835e9b9cc86a89 (patch) | |
tree | 04a0dca619b75e815384e5ee2d512df24ac2a213 /source4/torture | |
parent | ebbffd80862d7d7b025eca219bc0c8f818585ac9 (diff) | |
download | samba-7b00b558761b6564928289efcf835e9b9cc86a89.tar.gz |
s4/torture: fruit: in test_adouble_conversion() also check stream list and AFPINFO_STREAM
This reveals that the conversion doesn't work properly with
fruit:metadata=stream.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13155
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/vfs/fruit.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source4/torture/vfs/fruit.c b/source4/torture/vfs/fruit.c index 70e5c027928..04f04e2cd56 100644 --- a/source4/torture/vfs/fruit.c +++ b/source4/torture/vfs/fruit.c @@ -1959,6 +1959,13 @@ static bool test_adouble_conversion(struct torture_context *tctx, bool ret = true; const char *data = "This resource fork intentionally left blank"; size_t datalen = strlen(data); + const char *streams[] = { + "::$DATA", + AFPINFO_STREAM, + AFPRESOURCE_STREAM, + ":com.apple.metadata" "\xef\x80\xa2" "_kMDItemUserTags:$DATA", + ":foo" "\xef\x80\xa2" "bar:$DATA", /* "foo:bar:$DATA" */ + }; smb2_deltree(tree, BASEDIR); @@ -1989,12 +1996,21 @@ static bool test_adouble_conversion(struct torture_context *tctx, torture_assert_goto(tctx, ret == true, ret, done, "check AFPRESOURCE_STREAM failed\n"); + ret = check_stream(tree, __location__, tctx, mem_ctx, + fname, AFPINFO_STREAM, + 0, 60, 16, 8, "TESTSLOW"); + torture_assert_goto(tctx, ret == true, ret, done, + "check AFPINFO_STREAM failed\n"); + ret = check_stream(tree, __location__, tctx, mem_ctx, fname, ":foo" "\xef\x80\xa2" "bar:$DATA", /* "foo:bar:$DATA" */ 0, 3, 0, 3, "baz"); torture_assert_goto(tctx, ret == true, ret, done, "check foo:bar stream failed\n"); + ret = check_stream_list(tree, tctx, fname, 5, streams, false); + torture_assert_goto(tctx, ret == true, ret, done, "check_stream_list"); + done: smb2_deltree(tree, BASEDIR); talloc_free(mem_ctx); |