[Top] [All Lists]

[PATCH 2/5] xfstests 233: fix user fsgqa access to fsstress

To: xfs@xxxxxxxxxxx
Subject: [PATCH 2/5] xfstests 233: fix user fsgqa access to fsstress
From: tmarek@xxxxxxxxxx
Date: Fri, 13 Apr 2012 11:49:43 +0200
Cc: lczerner@xxxxxxxxxx, dchinner@xxxxxxxxxx, Tom Marek <tmarek@xxxxxxxxxx>
In-reply-to: <1334310586-2281-1-git-send-email-tmarek@xxxxxxxxxx>
References: <1334310586-2281-1-git-send-email-tmarek@xxxxxxxxxx>
From: Tom Marek <tmarek@xxxxxxxxxx>

User fsgqa may sometimes be unable to run fsstress (when xfstests are owned by
root) because fsgqa doesn't have rights to list directory where the fsstress
utility is located.

This fix changes directory to fsstress location as root before running
fsstress so user fsgqa may run it without any problems.

Signed-off-by: Tom Marek <tmarek@xxxxxxxxxx>

Reviewed-by: Lukas Czerner <lczerner@xxxxxxxxxx>
 233 |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/233 b/233
index 28e6ac7..e9eacae 100755
--- a/233
+++ b/233
@@ -62,14 +62,16 @@ _fsstress()
 -f rmdir=20 -f link=10 -f creat=10 -f mkdir=10 -f unlink=20 -f symlink=10 \
 -f rename=10 -f fsync=2 -f write=15 -f dwrite=15 \
 -n $count -d $out -p 7"
        echo "fsstress $args" | tee -a $here/$seq.full | sed -e "s#$out#outdir#"
-       if ! su $qa_user -c "$FSSTRESS_PROG $args" | tee -a $here/$seq.full | 
+       fsstressdir=${FSSTRESS_PROG%/*}
+       cd $fsstressdir
+       if ! su $qa_user -c "./`basename $FSSTRESS_PROG` $args" | tee -a 
$here/$seq.full | _filter_num
                echo "    fsstress $args returned $?"
                cat $tmp.out | tee -a $here/$seq.full
+       cd $here
 # real QA test starts here

<Prev in Thread] Current Thread [Next in Thread>