mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
tests: avoid errors on systems without getmntent
* tests/df/no-mtab-status.sh: Skip if getmntent() not available. * tests/df/skip-duplicates.sh: Likewise. Fixes http://bugs.gnu.org/17863
This commit is contained in:
1 parent
04fc32f7e0
commit
39e2a4cff8
2 files changed
+12
No files matched your search
@@ -23,6 +23,12 @@ require_gcc_shared_
|
||||
|
||||
df || skip_ "df fails"
|
||||
|
||||
grep '^#define HAVE_MNTENT_H 1' $CONFIG_HEADER > /dev/null \
|
||||
|| skip_ "no mntent.h available to confirm the interface"
|
||||
|
||||
grep '^#define HAVE_GETMNTENT 1' $CONFIG_HEADER > /dev/null \
|
||||
|| skip_ "getmntent is not used on this system"
|
||||
|
||||
# Simulate "mtab" failure.
|
||||
cat > k.c <<'EOF' || framework_failure_
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -28,6 +28,12 @@ df --local || skip_ "df fails"
|
||||
export CU_NONROOT_FS=$(df --local --output=target 2>&1 | grep /. | head -n1)
|
||||
test -z "$CU_NONROOT_FS" && unique_entries=1 || unique_entries=2
|
||||
|
||||
grep '^#define HAVE_MNTENT_H 1' $CONFIG_HEADER > /dev/null \
|
||||
|| skip_ "no mntent.h available to confirm the interface"
|
||||
|
||||
grep '^#define HAVE_GETMNTENT 1' $CONFIG_HEADER > /dev/null \
|
||||
|| skip_ "getmntent is not used on this system"
|
||||
|
||||
# Simulate an mtab file to test various cases.
|
||||
cat > k.c <<'EOF' || framework_failure_
|
||||
#include <stdio.h>
|
||||
|
||||
Reference in new issue
Block a user