generic/231: use relative path to invoke fsx
PATCH 1/2 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 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
tests/generic/231 +4 -2
@@ -23,8 +23,10 @@ _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 \ + # The absolute path $here might not be traversable (+x) for + # $qa_user, so supply a relative path to fsx here. + 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
PATCH 2/2 generic/233: use relative path to invoke fsstress
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").
--- tests/generic/233 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
tests/generic/233 +4 -1
@@ -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
Signature · 1 line
2.47.2