diff mbox series

[2/2] generic/233: use relative path to invoke fsstress

Message ID 20250416045112.617815-2-hch@lst.de (mailing list archive)
State New
Headers show
Series [1/2] generic/231: use relative path to invoke fsx | expand

Commit Message

Christoph Hellwig April 16, 2025, 4:51 a.m. UTC
This test uses su to run fsstress as $qa_user.  Because the shell calling
fsstress is run as $qa_user it might not be able to access the xfstests
or parent directory which might only be accessible to the user xfstests
is run as (e.g. root).  Switch back to calling fsstress using a relative
path, partially reverting the effects of commit c475ff6ff6d7
("common/config: add $here to FSSTRESS_PROG").

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
---
 tests/generic/233 | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tests/generic/233 b/tests/generic/233
index df67b39092b7..3fc1b63abb24 100755
--- a/tests/generic/233
+++ b/tests/generic/233
@@ -42,8 +42,11 @@  _fsstress()
 	# io_uring_queue_init fail on ENOMEM, set max locked memory to unlimited
 	# temporarily.
 	ulimit -l unlimited
+
+	# The absolute path $here might not be traversable (+x) for $qa_user, so
+	# supply a relative path to fsstress here.
 	echo "fsstress $args" >> $seqres.full
-	if ! _su $qa_user -c "$FSSTRESS_PROG $args" | tee -a $seqres.full | _filter_num
+	if ! _su $qa_user -c "ltp/fsstress $args" | tee -a $seqres.full | _filter_num
 	then
 		echo "    fsstress $args returned $?"
 		cat $tmp.out | tee -a $seqres.full