From 390e1bbc5adaae5f05081f773e52063f0ed169ce Mon Sep 17 00:00:00 2001 From: Jian Yu Date: Fri, 13 Sep 2013 20:35:56 +0800 Subject: [PATCH] LU-3249 tests: build POSIX test suite on FC18 While building POSIX test suite, some required header files are not in the /usr/include directory on Fedora 18 distribution. On FC18, only arm-gp2x-linux-glibc-2.3.6-11.fc18.noarch.rpm contains those header files. This patch links those header files to the standard system directory so as to make the building pass. Test-Parameters: envdefinitions=SLOW=yes \ clientdistro=fc18 serverdistro=el6 clientarch=x86_64 \ serverarch=x86_64 testlist=posix Signed-off-by: Jian Yu Change-Id: Idf622606d730d80a44e341bf7317dda37ea6bf82 Reviewed-on: http://review.whamcloud.com/7644 Reviewed-by: Minh Diep Tested-by: Hudson Reviewed-by: Wei Liu Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/tests/posix/posix.cfg | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/lustre/tests/posix/posix.cfg b/lustre/tests/posix/posix.cfg index 1f1408c..2f40b06 100644 --- a/lustre/tests/posix/posix.cfg +++ b/lustre/tests/posix/posix.cfg @@ -98,22 +98,27 @@ 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/issue; then + local prefix=/usr/lib/$(uname -m)-redhat-linux5E + if egrep -q "Fedora" /etc/issue; then + prefix=/usr/arm-gp2x-linux + 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 -- 1.8.3.1