Whamcloud - gitweb
LU-9260 test: Use the correct mount device when test against lustre 28/29628/2
authorWei Liu <wei3.liu@intel.com>
Wed, 23 Aug 2017 16:49:29 +0000 (09:49 -0700)
committerJohn L. Hammond <john.hammond@intel.com>
Thu, 26 Oct 2017 16:08:37 +0000 (16:08 +0000)
The changes pass the MGSNID:/FSNAME into test, instead of
using the default loop device when testing against lustre.
The corresponding changes to the Posix test suites are also needed
to make the testing pass. Related changes apply to toolkit.

Test-Parameters: trivial testlist=posix

Lustre-change: https://review.whamcloud.com/28661
Lustre-commit: 7b59ed3ab3c9bfae95b9904982869d31a7e65770

Change-Id: I32fc5a401fdc53ed133a78dc4c84b4a7e2a5ad19
Signed-off-by: Wei Liu <wei3.liu@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/29628
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
lustre/tests/posix.sh
lustre/tests/posix/posix.cfg

index 4c36a9a..429b93d 100755 (executable)
@@ -137,7 +137,7 @@ test_1() {
        fi
 
        log "Run POSIX test against lustre filesystem"
-       run_posix $MOUNT compare || \
+       run_posix $MOUNT $MGSNID $FSNAME compare ||
                error_noexit "Run POSIX testsuite on $MOUNT failed"
 
        [[ -d "$MOUNT/TESTROOT" ]] && rm -fr $MOUNT/TESTROOT
index 4cb72e3..13fcebd 100644 (file)
@@ -168,25 +168,28 @@ cleanup() {
 }
 
 run_posix() {
-    local MNTPNT=$1
-    local COMPARE=${2}
-    local compare=""
-    local rc=0
-    local cmd
-
-    [[ "x$COMPARE" != "x" ]] && compare="--compare-result"
-    # command to run posix test suite
-    cmd="TMP=/tmp/vsx0 TMPDIR=/tmp/vsx0 $POSIX_RUN --mountpt=$MNTPNT \
-        --posix-src=$POSIX_SRC --install-dir=$INSTALL_DIR \
-        --results-dir=$RESULT_DIR $compare 2>&1"
-
-    # run posix test suite
-    echo $cmd
-    if ! eval $cmd; then
-        rc=${PIPESTATUS[0]}
-    fi
+       local MNTPNT=$1
+       local MGSNID=$2
+       local FSNAME=$3
+       local COMPARE=${4}
+       local compare=""
+       local rc=0
+       local cmd
+
+       [[ "x$COMPARE" != "x" ]] && compare="--compare-result"
+       # command to run posix test suite
+       cmd="TMP=/tmp/vsx0 TMPDIR=/tmp/vsx0 $POSIX_RUN --mountpt=$MNTPNT \
+               --posix-src=$POSIX_SRC --install-dir=$INSTALL_DIR \
+               --results-dir=$RESULT_DIR --nospc-dev="$MGSNID:/$FSNAME" \
+               $compare 2>&1"
+
+       # run posix test suite
+       echo $cmd
+       if ! eval $cmd; then
+               rc=${PIPESTATUS[0]}
+       fi
 
-    return $rc
+       return $rc
 }
 
 setup_posix() {