mirror of
https://github.com/samba-team/samba.git
synced 2025-03-20 22:50:26 +03:00
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)
This commit is contained in:
parent
de829e6068
commit
093575e403
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user