[PATCH] Modify a vfs.fruit test to work on FreeBSD with fruit:resource=stream

Ralph Böhme slow at samba.org
Sat May 26 13:12:24 UTC 2018


Attached patch modifies a vfs.fruit test to make it work against FreeBSD with

With fruit:resource=stream and vfs_streams_xattr stacked behind vfs_fruit, the
AFP_Resource stream ends up being stored in filesytem xattrs. FreeBSD ZFS seems
to support largish xattrs, but 1 GB seems to be too much. As a realistic
maximums size for AFP_Resource is 64 MB (the largest one I've ever seen was 8
MB), the torture test is updated to use write a 64 MB resource fork instead of 1

Please review & push if happy. Thanks!


Ralph Boehme, Samba Team       https://samba.org/
Samba Developer, SerNet GmbH   https://sernet.de/en/samba/
GPG Key Fingerprint:           FAE2 C608 8A24 2520 51C5
                               59E4 AA1E 9B71 2639 9E46
-------------- next part --------------
From 75d9bae949f1dad1f76d137c55586c1c63e777ae Mon Sep 17 00:00:00 2001
From: Ralph Boehme <slow at samba.org>
Date: Sat, 19 May 2018 01:36:21 +0200
Subject: [PATCH] s4:torture/vfs/fruit: decrease large resource fork size in
 test from 1 GB to 64 MB

64 MB is a more realistic value and lets the test pass on FreeBSD with
fruit:resource=stream and vfs_streams_xattr.

Signed-off-by: Ralph Boehme <slow at samba.org>
 source4/torture/vfs/fruit.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/source4/torture/vfs/fruit.c b/source4/torture/vfs/fruit.c
index 9310d051131..6067bc64b52 100644
--- a/source4/torture/vfs/fruit.c
+++ b/source4/torture/vfs/fruit.c
@@ -1594,11 +1594,11 @@ static bool test_write_atalk_rfork_io(struct torture_context *tctx,
 	ret &= write_stream(tree, __location__, tctx, mem_ctx,
-			    (off_t)1<<32, 10, rfork_content);
+			    (off_t)64*1024*1024, 10, rfork_content);
 	ret &= check_stream(tree, __location__, tctx, mem_ctx,
-			    (off_t)1<<32, 10, 0, 10, rfork_content);
+			    (off_t)64*1024*1024, 10, 0, 10, rfork_content);
 	/* Truncate back to size of 1 byte */

More information about the samba-technical mailing list