summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2015-12-19 11:10:54 +0100
committerKarolin Seeger <kseeger@samba.org>2016-01-06 10:07:18 +0100
commita48eb89ded02597b35e7a7750db9dca2052c3df6 (patch)
tree97801561100b4354dfd2dad4ab1499516ee42012
parentc99c91003355498c9623bfbe6782526ec25c84f3 (diff)
downloadsamba-a48eb89ded02597b35e7a7750db9dca2052c3df6.tar.gz
s4:torture:vfs_fruit: update AFP_AfpInfo IO tests
When reading from the AFP_AfpInfo stream, OS X ignores the offset from the request and always reads from offset=0. The offset bounds check has a off-by-1 bug in OS X, so a request offset=60 (AFP_AfpInfo stream has a ficed size of 60 bytes), len=1 returns 1 byte from offset 0 insteaf of returning 0. 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 decde0b4812eba5f80b717fd2ae868558a022753)
-rw-r--r--source4/torture/vfs/fruit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/torture/vfs/fruit.c b/source4/torture/vfs/fruit.c
index 8a7ccad195a..bd6589dfb0c 100644
--- a/source4/torture/vfs/fruit.c
+++ b/source4/torture/vfs/fruit.c
@@ -1310,7 +1310,7 @@ static bool test_read_netatalk_metadata(struct torture_context *tctx,
torture_assert_goto(tctx, ret == true, ret, done, "check_stream failed");
ret = check_stream(tree, __location__, tctx, mem_ctx, fname, AFPINFO_STREAM,
- 16, 8, 0, 8, "BARRFOOO");
+ 16, 8, 0, 3, "AFP");
torture_assert_goto(tctx, ret == true, ret, done, "check_stream failed");
/* Check reading offset and read size > sizeof(AFPINFO_STREAM) */
@@ -1321,11 +1321,11 @@ static bool test_read_netatalk_metadata(struct torture_context *tctx,
len = read_stream(tree, __location__, tctx, mem_ctx, fname,
AFPINFO_STREAM, 59, 2);
- CHECK_VALUE(len, 1);
+ CHECK_VALUE(len, 2);
len = read_stream(tree, __location__, tctx, mem_ctx, fname,
AFPINFO_STREAM, 60, 1);
- CHECK_VALUE(len, 0);
+ CHECK_VALUE(len, 1);
len = read_stream(tree, __location__, tctx, mem_ctx, fname,
AFPINFO_STREAM, 61, 1);