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

Jeremy Allison jra at samba.org
Tue May 29 16:45:44 UTC 2018


On Sat, May 26, 2018 at 03:12:24PM +0200, Ralph Böhme via samba-technical wrote:
> Hi!
> 
> Attached patch modifies a vfs.fruit test to make it work against FreeBSD with
> fruit:resource=stream.
> 
> 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
> GB.
> 
> Please review & push if happy. Thanks!

LGTM. Pushed !

> -- 
> 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

> 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,
>  			    fname, AFPRESOURCE_STREAM_NAME,
> -			    (off_t)1<<32, 10, rfork_content);
> +			    (off_t)64*1024*1024, 10, rfork_content);
>  
>  	ret &= check_stream(tree, __location__, tctx, mem_ctx,
>  			    fname, AFPRESOURCE_STREAM_NAME,
> -			    (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 */
>  
> -- 
> 2.13.6
> 




More information about the samba-technical mailing list