diff options
author | Pádraig Brady <P@draigBrady.com> | 2014-07-02 10:16:04 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2014-07-02 19:45:17 +0100 |
commit | 39e2a4cff85cd37797c062a6196d4ce465398d00 (patch) | |
tree | af474c0c12cfdce268c39672fd5dc25ae4fec79d /tests/df/skip-duplicates.sh | |
parent | 04fc32f7e038e92e033c770211749be683c74973 (diff) | |
download | coreutils-39e2a4cff85cd37797c062a6196d4ce465398d00.tar.xz |
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
Diffstat (limited to 'tests/df/skip-duplicates.sh')
-rwxr-xr-x | tests/df/skip-duplicates.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/df/skip-duplicates.sh b/tests/df/skip-duplicates.sh index 9f0f749fe..52b9014a3 100755 --- a/tests/df/skip-duplicates.sh +++ b/tests/df/skip-duplicates.sh @@ -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> |