Skip to contentSkip to conversation

generic/231: use relative path to invoke fsx

PATCH In review Christoph Hellwig 2 participants 2 messages Apr 14, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 generic/231: use relative path to invoke fsx

This test uses su to run fsx as $qa_user. Because the shell calling fsx 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 fsx using a relative path, partially reverting commit 1c67e8b191fe
("config: add FSX_PROG variable").

---
 tests/generic/231 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/generic/231 +2 -2
index b598a5d568bd..8dda926d875e 100755
@@ -23,8 +23,8 @@ _fsx()
 	echo "=== FSX Standard Mode, Memory Mapping, $tasks Tasks ==="
 	for (( i = 1; i <= $tasks; i++ )); do
 		SEED=$RANDOM
-		echo "$FSX_PROG $FSX_ARGS -S $SEED $SCRATCH_MNT/fsx_file$i" >>$seqres.full
-		_su $qa_user -c "$FSX_PROG $FSX_ARGS -S $SEED \
+		echo "ltp/fsx $FSX_ARGS -S $SEED $SCRATCH_MNT/fsx_file$i" >>$seqres.full
+		_su $qa_user -c "ltp/fsx $FSX_ARGS -S $SEED \
 			$FSX_AVOID $SCRATCH_MNT/fsx_file$i" >$tmp.output$i 2>&1 &
 	done
 
Signature · 1 line
2.47.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Christoph Hellwig

This test uses su to run fsx as $qa_user. Because the shell calling fsx 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 fsx using a relative path, partially reverting commit 1c67e8b191fe
("config: add FSX_PROG variable").

I make the same statement about leaving a note about using relative paths in the comments as I had for the previous fix.

With that applied here,

--D

Quoted 23 lines
---
 tests/generic/231 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/generic/231 +2 -2
index b598a5d568bd..8dda926d875e 100755
@@ -23,8 +23,8 @@ _fsx()
 	echo "=== FSX Standard Mode, Memory Mapping, $tasks Tasks ==="
 	for (( i = 1; i <= $tasks; i++ )); do
 		SEED=$RANDOM
-		echo "$FSX_PROG $FSX_ARGS -S $SEED $SCRATCH_MNT/fsx_file$i" >>$seqres.full
-		_su $qa_user -c "$FSX_PROG $FSX_ARGS -S $SEED \
+		echo "ltp/fsx $FSX_ARGS -S $SEED $SCRATCH_MNT/fsx_file$i" >>$seqres.full
+		_su $qa_user -c "ltp/fsx $FSX_ARGS -S $SEED \
 			$FSX_AVOID $SCRATCH_MNT/fsx_file$i" >$tmp.output$i 2>&1 &
 	done
 
Signature · 1 line
2.47.2