Whamcloud - gitweb
LU-16335 build: remove _GNU_SOURCE dependency in lustre_user.h
[fs/lustre-release.git] / lustre / tests / sanity.sh
index aac7a2f..9ebd48b 100755 (executable)
@@ -25471,18 +25471,19 @@ test_400a() { # LU-1606, was conf-sanity test_74
        local prefix=/usr/include/lustre
        local prog
 
-       # Oleg removes c files in his test rig so test if any c files exist
-       [ -z "$(ls -A $LUSTRE_TESTS_API_DIR)" ] && \
-               skip_env "Needed c test files are missing"
+       # Oleg removes .c files in his test rig so test if any c files exist
+       [[ -n "$(ls -A $LUSTRE_TESTS_API_DIR)" ]] ||
+               skip_env "Needed .c test files are missing"
 
        if ! [[ -d $prefix ]]; then
                # Assume we're running in tree and fixup the include path.
-               extra_flags+=" -I$LUSTRE/../lnet/include/uapi -I$LUSTRE/include/uapi -I$LUSTRE/include"
-               extra_flags+=" -L$LUSTRE/utils/.lib"
+               extra_flags+=" -I$LUSTRE/../lnet/include/uapi"
+               extra_flags+=" -I$LUSTRE/include/uapi -I$LUSTRE/include"
+               extra_flags+=" -L$LUSTRE/utils/.libs"
        fi
 
        for prog in $LUSTRE_TESTS_API_DIR/*.c; do
-               $CC -Wall -Werror -std=c99 $extra_flags -o $out $prog -llustreapi ||
+               $CC -Wall -Werror $extra_flags -o $out $prog -llustreapi ||
                        error "client api broken"
        done
        rm -f $out
@@ -25514,7 +25515,7 @@ test_400b() { # LU-1606, LU-5011
                        continue # lustre_ioctl.h is internal header
                fi
 
-               $CC -Wall -Werror -std=c99 -include $header -c -x c /dev/null -o $out ||
+               $CC -Wall -Werror -include $header -c -x c /dev/null -o $out ||
                        error "cannot compile '$header'"
        done
        rm -f $out