From: Christoph Hellwig Date: Wed, 16 Apr 2025 04:51:11 +0000 (+0200) Subject: generic/231: use relative path to invoke fsx X-Git-Tag: v2025.04.27~6 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=b3e7ac4c5ec141ccfd29a87a6eedbe240af9955d;p=xfstests-dev.git 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"). Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Zorro Lang --- diff --git a/tests/generic/231 b/tests/generic/231 index b598a5d5..ce7e62ea 100755 --- a/tests/generic/231 +++ b/tests/generic/231 @@ -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