From 7b59ed3ab3c9bfae95b9904982869d31a7e65770 Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Wed, 23 Aug 2017 09:49:29 -0700 Subject: [PATCH] LU-9260 test: Use the correct mount device when test against lustre 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 Change-Id: I32fc5a401fdc53ed133a78dc4c84b4a7e2a5ad19 Signed-off-by: Wei Liu Reviewed-on: https://review.whamcloud.com/28661 Reviewed-by: Jian Yu Tested-by: Jenkins Tested-by: Maloo Reviewed-by: James Nunez Reviewed-by: Oleg Drokin --- lustre/tests/posix.sh | 2 +- lustre/tests/posix/posix.cfg | 39 +++++++++++++++++++++------------------ 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/lustre/tests/posix.sh b/lustre/tests/posix.sh index 4c36a9a..429b93d 100755 --- a/lustre/tests/posix.sh +++ b/lustre/tests/posix.sh @@ -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 diff --git a/lustre/tests/posix/posix.cfg b/lustre/tests/posix/posix.cfg index 4cb72e3..13fcebd 100644 --- a/lustre/tests/posix/posix.cfg +++ b/lustre/tests/posix/posix.cfg @@ -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() { -- 1.8.3.1