]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: port df/no-mtab-status to Solaris
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 18 Aug 2012 16:46:39 +0000 (09:46 -0700)
committerJim Meyering <meyering@redhat.com>
Sun, 19 Aug 2012 20:31:39 +0000 (22:31 +0200)
* tests/df/no-mtab-status: Include <mntent.h> in test program, so
that the getmntent hack compilation fails on Solaris, as it
should, since it's not compatible with Solaris.  Reported by
Stefano Lattarini in <http://bugs.gnu.org/12225>.

tests/df/no-mtab-status

index 6e078541fe918116b61ab5d687ea294c8399a3c3..e434f5f3e49f47cbf26a9d539cf6f7cb6437a855 100755 (executable)
@@ -26,6 +26,7 @@ df || skip_ "df fails"
 cat > k.c <<'EOF' || framework_failure_
 #include <stdio.h>
 #include <errno.h>
+#include <mntent.h>
 
 struct mntent *getmntent (FILE *fp)
 {
@@ -44,7 +45,7 @@ EOF
 
 # Then compile/link it:
 $CC -shared -fPIC -ldl -O2 k.c -o k.so \
-  || framework_failure_ 'failed to compile with -shared -fPIC'
+  || skip_ "getmntent hack does not work on this platform"
 
 # Test if LD_PRELOAD works:
 LD_PRELOAD=./k.so df