]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfs/073: avoid large recursive diff
authorChristoph Hellwig <hch@lst.de>
Thu, 20 Jun 2024 12:48:44 +0000 (14:48 +0200)
committerZorro Lang <zlang@kernel.org>
Fri, 21 Jun 2024 16:38:24 +0000 (00:38 +0800)
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@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/xfs/073

index c7616b9e9b01da1fe9cdef3a9e8982f4925814aa..0f96fdb09bd6d066156a61002082451f783c0d67 100755 (executable)
@@ -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)
 
        echo comparing new image directories to old
        find $source_dir | _filter_path $source_dir > $tmp.manifest1