FS/XFS testing framework
 help / color / mirror / Atom feed
From: Andrey Albershteyn <aalbersh@kernel.org>
To: fstests@vger.kernel.org, zlang@kernel.org
Cc: Andrey Albershteyn <aalbersh@kernel.org>
Subject: [PATCH 3/4] generic/452: make coping work with multi-call binary
Date: Fri, 18 Sep 2026 19:32:08 +0200	[thread overview]
Message-ID: <20260918173218.1254465-4-aalbersh@kernel.org> (raw)
In-Reply-To: <20260918173218.1254465-1-aalbersh@kernel.org>

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     | 4 ++--
 tests/generic/452.out | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/generic/452 b/tests/generic/452
index a19a79623489..2166d4edd227 100755
--- a/tests/generic/452
+++ b/tests/generic/452
@@ -24,8 +24,8 @@ _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
+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


  parent reply	other threads:[~2026-09-18 17:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-18 17:32 [PATCH 0/4] xfstests: random fixes Andrey Albershteyn
2026-09-18 17:32 ` [PATCH 1/4] xfs/071: use _link_out_link instead of opencoding file picking Andrey Albershteyn
2026-09-22 12:37   ` Christoph Hellwig
2026-09-18 17:32 ` [PATCH 2/4] common: link .out file to the output directory Andrey Albershteyn
2026-09-22 12:38   ` Christoph Hellwig
2026-09-22 13:12     ` Andrey Albershteyn
2026-09-18 17:32 ` Andrey Albershteyn [this message]
2026-09-22 12:40   ` [PATCH 3/4] generic/452: make coping work with multi-call binary Christoph Hellwig
2026-09-18 17:32 ` [PATCH 4/4] xfstests: fix permissions on system file installed by libtoolize Andrey Albershteyn
2026-09-22 12:40   ` Christoph Hellwig

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=20260918173218.1254465-4-aalbersh@kernel.org \
    --to=aalbersh@kernel.org \
    --cc=fstests@vger.kernel.org \
    --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