diff mbox series

generic/233: use relative path to invoke fsstress

Message ID 20250414115820.399980-1-hch@lst.de (mailing list archive)
State New
Headers show
Series generic/233: use relative path to invoke fsstress | expand

Commit Message

Christoph Hellwig April 14, 2025, 11:58 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>
---
 tests/generic/233 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Darrick J. Wong April 14, 2025, 6:51 p.m. UTC | #1
On Mon, Apr 14, 2025 at 01:58:20PM +0200, Christoph Hellwig wrote:
> 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>

Ooops, I missed that subtlety.  Maybe we should document that?

	# The absolute path $here might not be traversable (+x) to the
	# qa_user, so supply a relative path to fsstress here.
	if ! _su $qa_user -c "ltp/fsstress $args" | tee -a $seqres.full | _filter_num

With something like that captured,
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>

--D

> ---
>  tests/generic/233 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/generic/233 b/tests/generic/233
> index df67b39092b7..91dc554d3478 100755
> --- a/tests/generic/233
> +++ b/tests/generic/233
> @@ -43,7 +43,7 @@ _fsstress()
>  	# temporarily.
>  	ulimit -l unlimited
>  	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
> -- 
> 2.47.2
> 
>
diff mbox series

Patch

diff --git a/tests/generic/233 b/tests/generic/233
index df67b39092b7..91dc554d3478 100755
--- a/tests/generic/233
+++ b/tests/generic/233
@@ -43,7 +43,7 @@  _fsstress()
 	# temporarily.
 	ulimit -l unlimited
 	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