Re: [PATCH] xfs/073: avoid large recurise diff

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 20, 2024 at 02:48:44PM +0200, Christoph Hellwig wrote:
> xfs/073 has been failing for me for a while on most of my test setups
> with:
> 
> diff: memory exhausted
> 
> from the large recursive diff it does.  Replace that with a pipe using
> md5sum to reduce the memory usage.
> 
> Based on a snipplet from Darrick Wong.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>

LGTM
Reviewed-by: Darrick J. Wong <djwong@xxxxxxxxxx>

> ---
>  tests/xfs/073 | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/xfs/073 b/tests/xfs/073
> index c7616b9e9..0f96fdb09 100755
> --- a/tests/xfs/073
> +++ b/tests/xfs/073
> @@ -76,7 +76,8 @@ _verify_copy()
>  	fi
>  
>  	echo comparing new image files to old
> -	diff -Naur $source_dir $target_dir
> +	(cd $source_dir; find . -type f -print0 | xargs -0 md5sum) | \
> +	(cd $target_dir ; md5sum -c --quiet)

Dumb nit: shellcheck   ^^ tells me these semicolons should be a '&&' so
that the find/md5sum won't run if the cd fails, but the incorrect file
list and whatever error messages cd coughs up will be enough to fail the
test anyway.

--D

>  
>  	echo comparing new image directories to old
>  	find $source_dir | _filter_path $source_dir > $tmp.manifest1
> -- 
> 2.43.0
> 
> 




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux