Whamcloud - gitweb
LU-13776 tests: make sure pjdfstest.sh writes to tmp
[fs/lustre-release.git] / lustre / tests / posix / posix.cfg
index 1f1408c..13fcebd 100644 (file)
@@ -98,22 +98,30 @@ prep() {
     [[ -f $TEST_BIN ]] && rm -f $TEST_BIN
     [[ -d $INSTALL_DIR ]] && rm -rf $INSTALL_DIR
 
-    if grep -q " 6." /etc/issue; then
-        [[ -d /usr/include/bits ]] || mkdir -p /usr/include/bits
-        [[ -d /usr/include/sys ]] || mkdir -p /usr/include/sys
-        [[ -s /usr/include/stropts.h ]] || \
-            ln -s /usr/lib/x86_64-redhat-linux5E/include/stropts.h \
-            /usr/include/stropts.h
-        [[ -s /usr/include/bits/stropts.h ]] || \
-            ln -s /usr/lib/x86_64-redhat-linux5E/include/bits/stropts.h \
-            /usr/include/bits/stropts.h
-        [[ -s /usr/include/bits/xtitypes.h ]] || \
-            ln -s /usr/lib/x86_64-redhat-linux5E/include/bits/xtitypes.h \
-            /usr/include/bits/xtitypes.h
-        [[ -s /usr/include/sys/stropts.h ]] || \
-            ln -s /usr/lib/x86_64-redhat-linux5E/include/sys/stropts.h \
-            /usr/include/sys/stropts.h
-    fi
+       if egrep -q "CentOS|Red Hat|Fedora" /etc/redhat-release; then
+               local prefix=/usr/lib/$(uname -m)-redhat-linux5E
+               if egrep -q "Fedora" /etc/issue; then
+                       prefix=/usr/arm-gp2x-linux
+               fi
+               if grep -q "el7" <<<$(uname -r); then
+                       # Fix LU-9102
+                       prefix=/usr/local/lib/x86_64-redhat-linux5E
+               fi
+               [[ -d /usr/include/bits ]] || mkdir -p /usr/include/bits
+               [[ -d /usr/include/sys ]] || mkdir -p /usr/include/sys
+               [[ -s /usr/include/stropts.h ]] ||
+                       ln -s $prefix/include/stropts.h \
+                       /usr/include/stropts.h
+               [[ -s /usr/include/bits/stropts.h ]] ||
+                       ln -s $prefix/include/bits/stropts.h \
+                       /usr/include/bits/stropts.h
+               [[ -s /usr/include/bits/xtitypes.h ]] ||
+                       ln -s $prefix/include/bits/xtitypes.h \
+                       /usr/include/bits/xtitypes.h
+               [[ -s /usr/include/sys/stropts.h ]] ||
+                       ln -s $prefix/include/sys/stropts.h \
+                       /usr/include/sys/stropts.h
+       fi
 
     pushd $POSIX_SRC > /dev/null
 
@@ -160,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
-
-    return $rc
+       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
 }
 
 setup_posix() {