Whamcloud - gitweb
LU-9611 lod: allow -1 for default stripe count/offset
[fs/lustre-release.git] / lustre / tests / posix / posix.cfg
index 86980b6..4cb72e3 100644 (file)
@@ -51,7 +51,8 @@ delete_posix_users() {
 # Setup users and groups for running the POSIX test suite.
 setup_posix_users() {
        local node=${1:-$HOSTNAME}
-       local gid=$GROUP_ID
+       # consistent with install.sh in LSB Test Suite
+       local gid=$((GROUP_ID + 1))
        local uid=$USER_ID
        local user group
        local home
@@ -97,26 +98,30 @@ prep() {
     [[ -f $TEST_BIN ]] && rm -f $TEST_BIN
     [[ -d $INSTALL_DIR ]] && rm -rf $INSTALL_DIR
 
-    rpm -q byacc > /dev/null || yum -y install byacc
-    if grep -q " 6." /etc/issue; then
-        rpm -q compat-glibc-headers > /dev/null || \
-            yum install -y compat-glibc-headers
-
-        [[ -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