diff options
author | Pádraig Brady <P@draigBrady.com> | 2015-01-12 01:14:11 +0000 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2015-01-12 01:24:29 +0000 |
commit | 924b1cadff3f2782475516d7eca9aabe856dbf0f (patch) | |
tree | 98bd0fe9735e2c442ff7243ffa815cd684d8dc51 /tests/df/no-mtab-status.sh | |
parent | eef0cd62dd63c12e28b1c7779fb149a8a30f8fe7 (diff) | |
download | coreutils-924b1cadff3f2782475516d7eca9aabe856dbf0f.tar.xz |
tests: avoid skipping some df tests with libmount
* tests/df/no-mtab-status.sh: Provide libmount placeholders,
to avoid skipping the test when libmount is in use.
* tests/df/skip-duplicates.sh: Likewise.
* tests/df/skip-rootfs.sh: Comment that the test is moot
when libmount (/proc/self/mountinfo) is being used.
Diffstat (limited to 'tests/df/no-mtab-status.sh')
-rwxr-xr-x | tests/df/no-mtab-status.sh | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/df/no-mtab-status.sh b/tests/df/no-mtab-status.sh index 98254f9b4..d9899c4ad 100755 --- a/tests/df/no-mtab-status.sh +++ b/tests/df/no-mtab-status.sh @@ -30,10 +30,21 @@ 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_ +cat > k.c <<EOF || framework_failure_ #include <stdio.h> #include <errno.h> #include <mntent.h> +#include "$CONFIG_HEADER" + +#ifdef MOUNTED_PROC_MOUNTINFO +# include <libmount/libmount.h> +struct libmnt_table *mnt_new_table_from_file(const char *filename) +{ + /* Returning NULL here will get read_file_system_list() + to fall back to using getmntent() below. */ + return NULL; +} +#endif struct mntent *getmntent (FILE *fp) { |