FS/XFS testing framework
 help / color / mirror / Atom feed
* [PATCH v2 0/4] xfstests: random fixes
@ 2026-09-23  9:32 Andrey Albershteyn
  2026-09-23  9:32 ` [PATCH v2 1/4] xfs/071: use _link_out_link instead of opencoding file picking Andrey Albershteyn
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Andrey Albershteyn @ 2026-09-23  9:32 UTC (permalink / raw)
  To: fstests, zlang; +Cc: Andrey Albershteyn

Hi folks,

This series contain a few random fixes I apply for xfstests in my
immutable test machines. These make it easier to work with read-only
xfstests package.

Changes from v1:
- Add RvB
- Add comment in generic/452

Andrey Albershteyn (4):
  xfs/071: use _link_out_link instead of opencoding file picking
  common: link .out file to the output directory
  generic/452: make coping work with multi-call binary
  xfstests: fix permissions on system file installed by libtoolize

 Makefile                                  |  3 +++
 check                                     | 12 ++++++++----
 common/rc                                 |  4 ++--
 tests/generic/452                         |  7 +++++--
 tests/generic/452.out                     |  4 ++--
 tests/xfs/071                             |  7 +++----
 tests/xfs/071.cfg                         |  1 +
 tests/xfs/{071.out.64 => 071.out.default} |  0
 8 files changed, 24 insertions(+), 14 deletions(-)
 create mode 100644 tests/xfs/071.cfg
 rename tests/xfs/{071.out.64 => 071.out.default} (100%)

-- 
2.54.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2 1/4] xfs/071: use _link_out_link instead of opencoding file picking
  2026-09-23  9:32 [PATCH v2 0/4] xfstests: random fixes Andrey Albershteyn
@ 2026-09-23  9:32 ` Andrey Albershteyn
  2026-09-23  9:32 ` [PATCH v2 2/4] common: link .out file to the output directory Andrey Albershteyn
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: Andrey Albershteyn @ 2026-09-23  9:32 UTC (permalink / raw)
  To: fstests, zlang; +Cc: Andrey Albershteyn, Christoph Hellwig

There's function which handles picking the right output file based on
the .cfg.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrey Albershteyn <aalbersh@kernel.org>
---
 tests/xfs/071                             | 7 +++----
 tests/xfs/071.cfg                         | 1 +
 tests/xfs/{071.out.64 => 071.out.default} | 0
 3 files changed, 4 insertions(+), 4 deletions(-)
 create mode 100644 tests/xfs/071.cfg
 rename tests/xfs/{071.out.64 => 071.out.default} (100%)

diff --git a/tests/xfs/071 b/tests/xfs/071
index c4722f67181a..47874e505c01 100755
--- a/tests/xfs/071
+++ b/tests/xfs/071
@@ -5,7 +5,6 @@
 # FS QA Test No. 071
 #
 # Exercise IO at large file offsets.
-seqfull=$0
 . ./common/preamble
 _begin_fstest rw auto
 
@@ -22,11 +21,11 @@ _cleanup()
 
 bitsperlong=`$here/src/feature -w`
 # link correct .out file
-rm -f $seqfull.out
+seqfull=$0
 if [ "$bitsperlong" -eq 32 ]; then
-	ln -s $seq.out.32 $seqfull.out
+	_link_out_file "32"
 else
-	ln -s $seq.out.64 $seqfull.out
+	_link_out_file ""
 fi
 
 _filter_io()
diff --git a/tests/xfs/071.cfg b/tests/xfs/071.cfg
new file mode 100644
index 000000000000..e806b07bc08b
--- /dev/null
+++ b/tests/xfs/071.cfg
@@ -0,0 +1 @@
+32: 32
diff --git a/tests/xfs/071.out.64 b/tests/xfs/071.out.default
similarity index 100%
rename from tests/xfs/071.out.64
rename to tests/xfs/071.out.default
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v2 2/4] common: link .out file to the output directory
  2026-09-23  9:32 [PATCH v2 0/4] xfstests: random fixes Andrey Albershteyn
  2026-09-23  9:32 ` [PATCH v2 1/4] xfs/071: use _link_out_link instead of opencoding file picking Andrey Albershteyn
@ 2026-09-23  9:32 ` Andrey Albershteyn
  2026-09-23 10:42   ` Zorro Lang
  2026-09-23 15:18   ` Darrick J. Wong
  2026-09-23  9:32 ` [PATCH v2 3/4] generic/452: make coping work with multi-call binary Andrey Albershteyn
  2026-09-23  9:32 ` [PATCH v2 4/4] xfstests: fix permissions on system file installed by libtoolize Andrey Albershteyn
  3 siblings, 2 replies; 9+ messages in thread
From: Andrey Albershteyn @ 2026-09-23  9:32 UTC (permalink / raw)
  To: fstests, zlang; +Cc: Andrey Albershteyn, Christoph Hellwig

On immutable systems with read-only system packages 'ln' will fail to
link .out files into system xfstests root directory. Fix this by linking
golden output file to the results output directory as a .out.good.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrey Albershteyn <aalbersh@kernel.org>
---
 check     | 12 ++++++++----
 common/rc |  4 ++--
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/check b/check
index bca302151955..aaed9f4af2ac 100755
--- a/check
+++ b/check
@@ -1181,7 +1181,11 @@ function run_section()
 		$timestamp && _timestamp
 		stop=`_wallclock`
 
-		if [ ! -f $seq.out ]; then
+		local out=$seq.out
+		if [ -f $seqres.out.good ]; then
+			out=$seqres.out.good
+		fi
+		if [ ! -f $out ]; then
 			_dump_err "no qualified output"
 			tc_status="fail"
 			rm -f "$seqres.mountfail?"
@@ -1193,7 +1197,7 @@ function run_section()
 		# from `foo' to 'foo'. Filter old versions to match the new
 		# version.
 		sed -i "s/\`/\'/g" $tmp.out
-		if diff $seq.out $tmp.out >/dev/null 2>&1 ; then
+		if diff $out $tmp.out >/dev/null 2>&1 ; then
 			if [ "$tc_status" != "fail" ]; then
 				echo "$seqnum `expr $stop - $start`" >>$tmp.time
 				echo -n " `expr $stop - $start`s"
@@ -1202,13 +1206,13 @@ function run_section()
 		else
 			_dump_err "- output mismatch (see $seqres.out.bad)"
 			mv $tmp.out $seqres.out.bad
-			$diff $seq.out $seqres.out.bad | {
+			$diff $out $seqres.out.bad | {
 			if test "$DIFF_LENGTH" -le 0; then
 				cat
 			else
 				head -n "$DIFF_LENGTH"
 				echo "..."
-				echo "(Run '$diff $here/$seq.out $seqres.out.bad'" \
+				echo "(Run '$diff $here/$out $seqres.out.bad'" \
 					" to see the entire diff)"
 			fi; } | sed -e 's/^\(.\)/    \1/'
 			tc_status="fail"
diff --git a/common/rc b/common/rc
index 3958ac934980..1eccd60c0bc0 100644
--- a/common/rc
+++ b/common/rc
@@ -3907,8 +3907,8 @@ _link_out_file_named()
 		print $result
 		' <$seqfull.cfg)
 	rm -f $1 || _fail "_link_out_file_named: failed to remove existing output file"
-	ln -fs $(basename $1).$suffix $1 || _fail "$(basename $1).$suffix: could not setup output file"
-	test -r $1 || _fail "$(basename $1).$suffix: output file for feature set \"$2\" not found"
+	ln -fs $(realpath $1).$suffix $seqres.out.good || _fail "$(basename $1).$suffix: could not setup output file"
+	test -r $seqres.out.good || _fail "$(basename $1).$suffix: output file for feature set \"$2\" not found"
 }
 
 _link_out_file()
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v2 3/4] generic/452: make coping work with multi-call binary
  2026-09-23  9:32 [PATCH v2 0/4] xfstests: random fixes Andrey Albershteyn
  2026-09-23  9:32 ` [PATCH v2 1/4] xfs/071: use _link_out_link instead of opencoding file picking Andrey Albershteyn
  2026-09-23  9:32 ` [PATCH v2 2/4] common: link .out file to the output directory Andrey Albershteyn
@ 2026-09-23  9:32 ` Andrey Albershteyn
  2026-09-23  9:32 ` [PATCH v2 4/4] xfstests: fix permissions on system file installed by libtoolize Andrey Albershteyn
  3 siblings, 0 replies; 9+ messages in thread
From: Andrey Albershteyn @ 2026-09-23  9:32 UTC (permalink / raw)
  To: fstests, zlang; +Cc: Andrey Albershteyn

On some system coreutils binaries are all symlink to the single
coreutils binary. Just copying 'ls' will not work in this setup,
especially, with the different binary name.

Add 'realpath' to find out the real binary is make it behave like an
'ls' by renaming it to 'ls'.

Signed-off-by: Andrey Albershteyn <aalbersh@kernel.org>
---
 tests/generic/452     | 7 +++++--
 tests/generic/452.out | 4 ++--
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/tests/generic/452 b/tests/generic/452
index a19a79623489..604d978cd98c 100755
--- a/tests/generic/452
+++ b/tests/generic/452
@@ -24,8 +24,11 @@ _exclude_scratch_mount_option "noexec"
 _scratch_mkfs > $seqres.full 2>&1
 _scratch_mount >> $seqres.full 2>&1
 
-LS="$(type -P ls)"
-SCRATCH_LS=$SCRATCH_MNT/ls_on_scratch
+# Resolve full absolute path to the ls binary. This is necessary for multi-call
+# binaries. In multi-call binary setup "ls" is just a symlink to a binary (e.g.
+# coreutils) which behaves as "ls" based on the executable name (first arg $0).
+LS="$(realpath $(type -P ls))"
+SCRATCH_LS=$SCRATCH_MNT/ls
 cp $LS $SCRATCH_LS
 
 $SCRATCH_LS $SCRATCH_LS | _filter_scratch
diff --git a/tests/generic/452.out b/tests/generic/452.out
index 1d24d6b3c83a..436a01e13b09 100644
--- a/tests/generic/452.out
+++ b/tests/generic/452.out
@@ -1,3 +1,3 @@
 QA output created by 452
-SCRATCH_MNT/ls_on_scratch
-SCRATCH_MNT/ls_on_scratch
+SCRATCH_MNT/ls
+SCRATCH_MNT/ls
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v2 4/4] xfstests: fix permissions on system file installed by libtoolize
  2026-09-23  9:32 [PATCH v2 0/4] xfstests: random fixes Andrey Albershteyn
                   ` (2 preceding siblings ...)
  2026-09-23  9:32 ` [PATCH v2 3/4] generic/452: make coping work with multi-call binary Andrey Albershteyn
@ 2026-09-23  9:32 ` Andrey Albershteyn
  3 siblings, 0 replies; 9+ messages in thread
From: Andrey Albershteyn @ 2026-09-23  9:32 UTC (permalink / raw)
  To: fstests, zlang; +Cc: Andrey Albershteyn, Christoph Hellwig

Libtoolize installs set of auxiliary files from its system package.
Not all distributions have the same permissions set on these files.
For example, read-only libtoolize system package will copy those
files without write permissions. This causes build to fail as next
line copies ./include/install-sh over ./install-sh which will fail.

Fix this by setting permission explicitly on files copied by libtoolize.

See similar commit in xfsprogs:
6b32423addd2 ("xfsprogs: fix permissions on files installed by libtoolize")

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrey Albershteyn <aalbersh@kernel.org>
---
 Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Makefile b/Makefile
index a48d8d62f038..6c3de609bf38 100644
--- a/Makefile
+++ b/Makefile
@@ -76,6 +76,9 @@ endif
 
 configure: configure.ac
 	libtoolize -cfi
+	chmod 755 config.guess config.sub install-sh
+	chmod 644 ltmain.sh m4/libtool.m4 m4/ltoptions.m4 m4/ltsugar.m4 \
+		m4/ltversion.m4 m4/lt~obsolete.m4
 	cp include/install-sh .
 	aclocal -I m4
 	autoheader
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 2/4] common: link .out file to the output directory
  2026-09-23  9:32 ` [PATCH v2 2/4] common: link .out file to the output directory Andrey Albershteyn
@ 2026-09-23 10:42   ` Zorro Lang
  2026-09-23 12:28     ` Andrey Albershteyn
  2026-09-23 15:18   ` Darrick J. Wong
  1 sibling, 1 reply; 9+ messages in thread
From: Zorro Lang @ 2026-09-23 10:42 UTC (permalink / raw)
  To: Andrey Albershteyn; +Cc: fstests, Christoph Hellwig

On Wed, Sep 23, 2026 at 11:32:53AM +0200, Andrey Albershteyn wrote:
> On immutable systems with read-only system packages 'ln' will fail to
> link .out files into system xfstests root directory. Fix this by linking
> golden output file to the results output directory as a .out.good.

I was wondering, did you install xfstests into a read-only directory/fs and
then redirect results to a writable directory by setting
RESULT_BASE=/path/to/rw_dir?

>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> Signed-off-by: Andrey Albershteyn <aalbersh@kernel.org>
> ---
>  check     | 12 ++++++++----
>  common/rc |  4 ++--
>  2 files changed, 10 insertions(+), 6 deletions(-)
> 
> diff --git a/check b/check
> index bca302151955..aaed9f4af2ac 100755
> --- a/check
> +++ b/check
> @@ -1181,7 +1181,11 @@ function run_section()
>  		$timestamp && _timestamp
>  		stop=`_wallclock`
>  
> -		if [ ! -f $seq.out ]; then
> +		local out=$seq.out
> +		if [ -f $seqres.out.good ]; then
> +			out=$seqres.out.good

Since we are introducing this new .out.good file, although it works fine in
most cases, I think we should probably clean it up before each test starts,
just like we already do for .out.bad and .hints in ./check .

Thanks,
Zorro

> +		fi
> +		if [ ! -f $out ]; then
>  			_dump_err "no qualified output"
>  			tc_status="fail"
>  			rm -f "$seqres.mountfail?"
> @@ -1193,7 +1197,7 @@ function run_section()
>  		# from `foo' to 'foo'. Filter old versions to match the new
>  		# version.
>  		sed -i "s/\`/\'/g" $tmp.out
> -		if diff $seq.out $tmp.out >/dev/null 2>&1 ; then
> +		if diff $out $tmp.out >/dev/null 2>&1 ; then
>  			if [ "$tc_status" != "fail" ]; then
>  				echo "$seqnum `expr $stop - $start`" >>$tmp.time
>  				echo -n " `expr $stop - $start`s"
> @@ -1202,13 +1206,13 @@ function run_section()
>  		else
>  			_dump_err "- output mismatch (see $seqres.out.bad)"
>  			mv $tmp.out $seqres.out.bad
> -			$diff $seq.out $seqres.out.bad | {
> +			$diff $out $seqres.out.bad | {
>  			if test "$DIFF_LENGTH" -le 0; then
>  				cat
>  			else
>  				head -n "$DIFF_LENGTH"
>  				echo "..."
> -				echo "(Run '$diff $here/$seq.out $seqres.out.bad'" \
> +				echo "(Run '$diff $here/$out $seqres.out.bad'" \
>  					" to see the entire diff)"
>  			fi; } | sed -e 's/^\(.\)/    \1/'
>  			tc_status="fail"
> diff --git a/common/rc b/common/rc
> index 3958ac934980..1eccd60c0bc0 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -3907,8 +3907,8 @@ _link_out_file_named()
>  		print $result
>  		' <$seqfull.cfg)
>  	rm -f $1 || _fail "_link_out_file_named: failed to remove existing output file"
> -	ln -fs $(basename $1).$suffix $1 || _fail "$(basename $1).$suffix: could not setup output file"
> -	test -r $1 || _fail "$(basename $1).$suffix: output file for feature set \"$2\" not found"
> +	ln -fs $(realpath $1).$suffix $seqres.out.good || _fail "$(basename $1).$suffix: could not setup output file"
> +	test -r $seqres.out.good || _fail "$(basename $1).$suffix: output file for feature set \"$2\" not found"
>  }
>  
>  _link_out_file()
> -- 
> 2.54.0
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 2/4] common: link .out file to the output directory
  2026-09-23 10:42   ` Zorro Lang
@ 2026-09-23 12:28     ` Andrey Albershteyn
  0 siblings, 0 replies; 9+ messages in thread
From: Andrey Albershteyn @ 2026-09-23 12:28 UTC (permalink / raw)
  To: fstests, Christoph Hellwig

On 2026-09-23 18:42:55, Zorro Lang wrote:
> On Wed, Sep 23, 2026 at 11:32:53AM +0200, Andrey Albershteyn wrote:
> > On immutable systems with read-only system packages 'ln' will fail to
> > link .out files into system xfstests root directory. Fix this by linking
> > golden output file to the results output directory as a .out.good.
> 
> I was wondering, did you install xfstests into a read-only directory/fs and
> then redirect results to a writable directory by setting
> RESULT_BASE=/path/to/rw_dir?

Yes

> 
> >
> > Reviewed-by: Christoph Hellwig <hch@lst.de>
> > Signed-off-by: Andrey Albershteyn <aalbersh@kernel.org>
> > ---
> >  check     | 12 ++++++++----
> >  common/rc |  4 ++--
> >  2 files changed, 10 insertions(+), 6 deletions(-)
> > 
> > diff --git a/check b/check
> > index bca302151955..aaed9f4af2ac 100755
> > --- a/check
> > +++ b/check
> > @@ -1181,7 +1181,11 @@ function run_section()
> >  		$timestamp && _timestamp
> >  		stop=`_wallclock`
> >  
> > -		if [ ! -f $seq.out ]; then
> > +		local out=$seq.out
> > +		if [ -f $seqres.out.good ]; then
> > +			out=$seqres.out.good
> 
> Since we are introducing this new .out.good file, although it works fine in
> most cases, I think we should probably clean it up before each test starts,
> just like we already do for .out.bad and .hints in ./check .

Yeah, sure, I will do that in v3

-- 
- Andrey

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 2/4] common: link .out file to the output directory
  2026-09-23  9:32 ` [PATCH v2 2/4] common: link .out file to the output directory Andrey Albershteyn
  2026-09-23 10:42   ` Zorro Lang
@ 2026-09-23 15:18   ` Darrick J. Wong
  2026-09-24 13:25     ` Zorro Lang
  1 sibling, 1 reply; 9+ messages in thread
From: Darrick J. Wong @ 2026-09-23 15:18 UTC (permalink / raw)
  To: Andrey Albershteyn; +Cc: fstests, zlang, Christoph Hellwig

On Wed, Sep 23, 2026 at 11:32:53AM +0200, Andrey Albershteyn wrote:
> On immutable systems with read-only system packages 'ln' will fail to
> link .out files into system xfstests root directory. Fix this by linking
> golden output file to the results output directory as a .out.good.
> 
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> Signed-off-by: Andrey Albershteyn <aalbersh@kernel.org>
> ---
>  check     | 12 ++++++++----
>  common/rc |  4 ++--
>  2 files changed, 10 insertions(+), 6 deletions(-)
> 
> diff --git a/check b/check
> index bca302151955..aaed9f4af2ac 100755
> --- a/check
> +++ b/check
> @@ -1181,7 +1181,11 @@ function run_section()
>  		$timestamp && _timestamp
>  		stop=`_wallclock`
>  
> -		if [ ! -f $seq.out ]; then
> +		local out=$seq.out
> +		if [ -f $seqres.out.good ]; then
> +			out=$seqres.out.good
> +		fi
> +		if [ ! -f $out ]; then
>  			_dump_err "no qualified output"
>  			tc_status="fail"
>  			rm -f "$seqres.mountfail?"
> @@ -1193,7 +1197,7 @@ function run_section()
>  		# from `foo' to 'foo'. Filter old versions to match the new
>  		# version.
>  		sed -i "s/\`/\'/g" $tmp.out
> -		if diff $seq.out $tmp.out >/dev/null 2>&1 ; then
> +		if diff $out $tmp.out >/dev/null 2>&1 ; then
>  			if [ "$tc_status" != "fail" ]; then
>  				echo "$seqnum `expr $stop - $start`" >>$tmp.time
>  				echo -n " `expr $stop - $start`s"
> @@ -1202,13 +1206,13 @@ function run_section()
>  		else
>  			_dump_err "- output mismatch (see $seqres.out.bad)"
>  			mv $tmp.out $seqres.out.bad
> -			$diff $seq.out $seqres.out.bad | {
> +			$diff $out $seqres.out.bad | {
>  			if test "$DIFF_LENGTH" -le 0; then
>  				cat
>  			else
>  				head -n "$DIFF_LENGTH"
>  				echo "..."
> -				echo "(Run '$diff $here/$seq.out $seqres.out.bad'" \
> +				echo "(Run '$diff $here/$out $seqres.out.bad'" \

Should this be $out not $here/$out , since $out is really just
$seqres.out.good ?

echo "(Run '$diff $out $seqres.out.bad' to see the entire diff)"

--D

>  					" to see the entire diff)"
>  			fi; } | sed -e 's/^\(.\)/    \1/'
>  			tc_status="fail"
> diff --git a/common/rc b/common/rc
> index 3958ac934980..1eccd60c0bc0 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -3907,8 +3907,8 @@ _link_out_file_named()
>  		print $result
>  		' <$seqfull.cfg)
>  	rm -f $1 || _fail "_link_out_file_named: failed to remove existing output file"
> -	ln -fs $(basename $1).$suffix $1 || _fail "$(basename $1).$suffix: could not setup output file"
> -	test -r $1 || _fail "$(basename $1).$suffix: output file for feature set \"$2\" not found"
> +	ln -fs $(realpath $1).$suffix $seqres.out.good || _fail "$(basename $1).$suffix: could not setup output file"
> +	test -r $seqres.out.good || _fail "$(basename $1).$suffix: output file for feature set \"$2\" not found"
>  }
>  
>  _link_out_file()
> -- 
> 2.54.0
> 
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 2/4] common: link .out file to the output directory
  2026-09-23 15:18   ` Darrick J. Wong
@ 2026-09-24 13:25     ` Zorro Lang
  0 siblings, 0 replies; 9+ messages in thread
From: Zorro Lang @ 2026-09-24 13:25 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: Andrey Albershteyn, fstests, Christoph Hellwig

On Wed, Sep 23, 2026 at 08:18:22AM -0700, Darrick J. Wong wrote:
> On Wed, Sep 23, 2026 at 11:32:53AM +0200, Andrey Albershteyn wrote:
> > On immutable systems with read-only system packages 'ln' will fail to
> > link .out files into system xfstests root directory. Fix this by linking
> > golden output file to the results output directory as a .out.good.
> > 
> > Reviewed-by: Christoph Hellwig <hch@lst.de>
> > Signed-off-by: Andrey Albershteyn <aalbersh@kernel.org>
> > ---
> >  check     | 12 ++++++++----
> >  common/rc |  4 ++--
> >  2 files changed, 10 insertions(+), 6 deletions(-)
> > 
> > diff --git a/check b/check
> > index bca302151955..aaed9f4af2ac 100755
> > --- a/check
> > +++ b/check
> > @@ -1181,7 +1181,11 @@ function run_section()
> >  		$timestamp && _timestamp
> >  		stop=`_wallclock`
> >  
> > -		if [ ! -f $seq.out ]; then
> > +		local out=$seq.out
> > +		if [ -f $seqres.out.good ]; then
> > +			out=$seqres.out.good
> > +		fi
> > +		if [ ! -f $out ]; then
> >  			_dump_err "no qualified output"
> >  			tc_status="fail"
> >  			rm -f "$seqres.mountfail?"
> > @@ -1193,7 +1197,7 @@ function run_section()
> >  		# from `foo' to 'foo'. Filter old versions to match the new
> >  		# version.
> >  		sed -i "s/\`/\'/g" $tmp.out
> > -		if diff $seq.out $tmp.out >/dev/null 2>&1 ; then
> > +		if diff $out $tmp.out >/dev/null 2>&1 ; then
> >  			if [ "$tc_status" != "fail" ]; then
> >  				echo "$seqnum `expr $stop - $start`" >>$tmp.time
> >  				echo -n " `expr $stop - $start`s"
> > @@ -1202,13 +1206,13 @@ function run_section()
> >  		else
> >  			_dump_err "- output mismatch (see $seqres.out.bad)"
> >  			mv $tmp.out $seqres.out.bad
> > -			$diff $seq.out $seqres.out.bad | {
> > +			$diff $out $seqres.out.bad | {
> >  			if test "$DIFF_LENGTH" -le 0; then
> >  				cat
> >  			else
> >  				head -n "$DIFF_LENGTH"
> >  				echo "..."
> > -				echo "(Run '$diff $here/$seq.out $seqres.out.bad'" \
> > +				echo "(Run '$diff $here/$out $seqres.out.bad'" \
> 
> Should this be $out not $here/$out , since $out is really just
> $seqres.out.good ?

Makes sense, looks like $out should already be an absolute path at here.

> 
> echo "(Run '$diff $out $seqres.out.bad' to see the entire diff)"
> 
> --D
> 
> >  					" to see the entire diff)"
> >  			fi; } | sed -e 's/^\(.\)/    \1/'
> >  			tc_status="fail"
> > diff --git a/common/rc b/common/rc
> > index 3958ac934980..1eccd60c0bc0 100644
> > --- a/common/rc
> > +++ b/common/rc
> > @@ -3907,8 +3907,8 @@ _link_out_file_named()
> >  		print $result
> >  		' <$seqfull.cfg)
> >  	rm -f $1 || _fail "_link_out_file_named: failed to remove existing output file"
> > -	ln -fs $(basename $1).$suffix $1 || _fail "$(basename $1).$suffix: could not setup output file"
> > -	test -r $1 || _fail "$(basename $1).$suffix: output file for feature set \"$2\" not found"
> > +	ln -fs $(realpath $1).$suffix $seqres.out.good || _fail "$(basename $1).$suffix: could not setup output file"
> > +	test -r $seqres.out.good || _fail "$(basename $1).$suffix: output file for feature set \"$2\" not found"
> >  }
> >  
> >  _link_out_file()
> > -- 
> > 2.54.0
> > 
> > 

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-09-24 13:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-23  9:32 [PATCH v2 0/4] xfstests: random fixes Andrey Albershteyn
2026-09-23  9:32 ` [PATCH v2 1/4] xfs/071: use _link_out_link instead of opencoding file picking Andrey Albershteyn
2026-09-23  9:32 ` [PATCH v2 2/4] common: link .out file to the output directory Andrey Albershteyn
2026-09-23 10:42   ` Zorro Lang
2026-09-23 12:28     ` Andrey Albershteyn
2026-09-23 15:18   ` Darrick J. Wong
2026-09-24 13:25     ` Zorro Lang
2026-09-23  9:32 ` [PATCH v2 3/4] generic/452: make coping work with multi-call binary Andrey Albershteyn
2026-09-23  9:32 ` [PATCH v2 4/4] xfstests: fix permissions on system file installed by libtoolize Andrey Albershteyn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox