From: "Darrick J. Wong" <djwong@kernel.org>
To: Andrey Albershteyn <aalbersh@kernel.org>
Cc: fstests@vger.kernel.org, zlang@kernel.org,
Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH v2 2/4] common: link .out file to the output directory
Date: Wed, 23 Sep 2026 08:18:22 -0700 [thread overview]
Message-ID: <20260923151822.GD6253@frogsfrogsfrogs> (raw)
In-Reply-To: <20260923093259.16199-3-aalbersh@kernel.org>
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
>
>
next prev parent reply other threads:[~2026-09-23 15:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260923151822.GD6253@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=aalbersh@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=hch@lst.de \
--cc=zlang@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox