* can we pull in git as a dependency for xfstests?
@ 2024-06-11 5:41 Christoph Hellwig
2024-06-11 14:24 ` Darrick J. Wong
2024-06-12 4:58 ` Zorro Lang
0 siblings, 2 replies; 5+ messages in thread
From: Christoph Hellwig @ 2024-06-11 5:41 UTC (permalink / raw)
To: fstests
xfs/073 has been failing for me for a while on most of my test setups
with:
diff: memory exhausted
from the recursive diff. Switching to the significantly more memory
efficient implementation in git diff as in the patch below fixes this.
Would it be ok to pull in diff (including a supported check)?
diff --git a/tests/xfs/073 b/tests/xfs/073
index c7616b9e9..85d8ae8d0 100755
--- a/tests/xfs/073
+++ b/tests/xfs/073
@@ -76,7 +76,7 @@ _verify_copy()
fi
echo comparing new image files to old
- diff -Naur $source_dir $target_dir
+ git diff --no-index $source_dir $target_dir
echo comparing new image directories to old
find $source_dir | _filter_path $source_dir > $tmp.manifest1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: can we pull in git as a dependency for xfstests?
2024-06-11 5:41 can we pull in git as a dependency for xfstests? Christoph Hellwig
@ 2024-06-11 14:24 ` Darrick J. Wong
2024-06-11 16:25 ` Christoph Hellwig
2024-06-12 4:58 ` Zorro Lang
1 sibling, 1 reply; 5+ messages in thread
From: Darrick J. Wong @ 2024-06-11 14:24 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: fstests
On Mon, Jun 10, 2024 at 10:41:41PM -0700, 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 recursive diff. Switching to the significantly more memory
> efficient implementation in git diff as in the patch below fixes this.
>
> Would it be ok to pull in diff (including a supported check)?
>
> diff --git a/tests/xfs/073 b/tests/xfs/073
> index c7616b9e9..85d8ae8d0 100755
> --- a/tests/xfs/073
> +++ b/tests/xfs/073
> @@ -76,7 +76,7 @@ _verify_copy()
> fi
>
> echo comparing new image files to old
> - diff -Naur $source_dir $target_dir
> + git diff --no-index $source_dir $target_dir
How about
(cd $source_dir ; find . -type f -print0 | xargs -0 md5sum) | \
(cd $target_dir ; md5sum -c --quiet)
since 073.out doesn't contain any diff output?
--D
>
> echo comparing new image directories to old
> find $source_dir | _filter_path $source_dir > $tmp.manifest1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: can we pull in git as a dependency for xfstests?
2024-06-11 14:24 ` Darrick J. Wong
@ 2024-06-11 16:25 ` Christoph Hellwig
0 siblings, 0 replies; 5+ messages in thread
From: Christoph Hellwig @ 2024-06-11 16:25 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: Christoph Hellwig, fstests
On Tue, Jun 11, 2024 at 07:24:05AM -0700, Darrick J. Wong wrote:
> > - diff -Naur $source_dir $target_dir
> > + git diff --no-index $source_dir $target_dir
>
> How about
>
> (cd $source_dir ; find . -type f -print0 | xargs -0 md5sum) | \
> (cd $target_dir ; md5sum -c --quiet)
>
> since 073.out doesn't contain any diff output?
That works fine as well for me.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: can we pull in git as a dependency for xfstests?
2024-06-11 5:41 can we pull in git as a dependency for xfstests? Christoph Hellwig
2024-06-11 14:24 ` Darrick J. Wong
@ 2024-06-12 4:58 ` Zorro Lang
2024-06-12 5:10 ` Christoph Hellwig
1 sibling, 1 reply; 5+ messages in thread
From: Zorro Lang @ 2024-06-12 4:58 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: fstests
On Mon, Jun 10, 2024 at 10:41:41PM -0700, 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 recursive diff. Switching to the significantly more memory
> efficient implementation in git diff as in the patch below fixes this.
>
> Would it be ok to pull in diff (including a supported check)?
>
> diff --git a/tests/xfs/073 b/tests/xfs/073
> index c7616b9e9..85d8ae8d0 100755
> --- a/tests/xfs/073
> +++ b/tests/xfs/073
> @@ -76,7 +76,7 @@ _verify_copy()
> fi
>
> echo comparing new image files to old
> - diff -Naur $source_dir $target_dir
> + git diff --no-index $source_dir $target_dir
The "diff" is more widespread, if we can use diff, better to not bring in
a new necessary dependence. But you can make it to be optional if you
need. Likes:
_diff()
{
local cmd="git diff"
grep -wq -- "--no-index" <($cmd --help 2>/dev/null)
if [ $? -ne 0 ];then
cmd=diff
else
cmd="$cmd --no-index"
if
$cmd $*
}
But there might be some incompatible options betweeen "diff" and "git diff".
Thanks,
Zorro
>
> echo comparing new image directories to old
> find $source_dir | _filter_path $source_dir > $tmp.manifest1
>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: can we pull in git as a dependency for xfstests?
2024-06-12 4:58 ` Zorro Lang
@ 2024-06-12 5:10 ` Christoph Hellwig
0 siblings, 0 replies; 5+ messages in thread
From: Christoph Hellwig @ 2024-06-12 5:10 UTC (permalink / raw)
To: Zorro Lang; +Cc: Christoph Hellwig, fstests
On Wed, Jun 12, 2024 at 12:58:24PM +0800, Zorro Lang wrote:
> But there might be some incompatible options betweeen "diff" and "git diff".
Yes, many of the common diff options are not supported.
But I think the md5sum version from Darrick work just as fine, so I'll
wait for him to submit that.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-06-12 5:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-11 5:41 can we pull in git as a dependency for xfstests? Christoph Hellwig
2024-06-11 14:24 ` Darrick J. Wong
2024-06-11 16:25 ` Christoph Hellwig
2024-06-12 4:58 ` Zorro Lang
2024-06-12 5:10 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox