diff options
author | Assaf Gordon <assafgordon@gmail.com> | 2015-03-27 09:38:48 +0000 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2015-03-27 09:43:42 +0000 |
commit | cbed4b33762d9e42f403f3b5d15650ae925faa64 (patch) | |
tree | 9fd7dd13067a2c4736045747c285e23d6938cfca /tests/df | |
parent | 41d0fc1c37c68ae1a343965d9858c97e15a3cb9c (diff) | |
download | coreutils-cbed4b33762d9e42f403f3b5d15650ae925faa64.tar.xz |
tests: fix false test failure with df on Debian/kFreeBSD
* tests/fs/skip-duplicates.sh: On this platform .mnt_opts is significant
so define to empty to avoid a NULL deref in read_file_system_list().
Fixes http://bugs.gnu.org/20210
Diffstat (limited to 'tests/df')
-rwxr-xr-x | tests/df/skip-duplicates.sh | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/df/skip-duplicates.sh b/tests/df/skip-duplicates.sh index bbd4056b7..256070849 100755 --- a/tests/df/skip-duplicates.sh +++ b/tests/df/skip-duplicates.sh @@ -73,16 +73,16 @@ struct mntent *getmntent (FILE *fp) } static struct mntent mntents[] = { - {.mnt_fsname="/short", .mnt_dir="/invalid/mount/dir"}, - {.mnt_fsname="fsname", .mnt_dir="/",}, - {.mnt_fsname="/fsname", .mnt_dir="/."}, - {.mnt_fsname="/fsname", .mnt_dir="/"}, - {.mnt_fsname="virtfs", .mnt_dir="/NONROOT", .mnt_type="fstype1"}, - {.mnt_fsname="virtfs2", .mnt_dir="/NONROOT", .mnt_type="fstype2"}, - {.mnt_fsname="netns", .mnt_dir="net:[1234567]"}, - {.mnt_fsname="rem:ote1",.mnt_dir="/REMOTE"}, - {.mnt_fsname="rem:ote1",.mnt_dir="/REMOTE"}, - {.mnt_fsname="rem:ote2",.mnt_dir="/REMOTE"}, + {.mnt_fsname="/short", .mnt_dir="/invalid/mount/dir", .mnt_opts=""}, + {.mnt_fsname="fsname", .mnt_dir="/", .mnt_opts=""}, + {.mnt_fsname="/fsname", .mnt_dir="/.", .mnt_opts=""}, + {.mnt_fsname="/fsname", .mnt_dir="/", .mnt_opts=""}, + {.mnt_fsname="virtfs", .mnt_dir="/NONROOT", .mnt_type="t1", .mnt_opts=""}, + {.mnt_fsname="virtfs2", .mnt_dir="/NONROOT", .mnt_type="t2", .mnt_opts=""}, + {.mnt_fsname="netns", .mnt_dir="net:[1234567]", .mnt_opts=""}, + {.mnt_fsname="rem:ote1",.mnt_dir="/REMOTE", .mnt_opts=""}, + {.mnt_fsname="rem:ote1",.mnt_dir="/REMOTE", .mnt_opts=""}, + {.mnt_fsname="rem:ote2",.mnt_dir="/REMOTE", .mnt_opts=""}, }; if (done == 1) @@ -151,7 +151,7 @@ if test "$unique_entries" = 2; then fi # df should use the last seen devname (mnt_fsname) and devtype (mnt_type) -test $(grep -c 'virtfs2.*fstype2' <out) -eq 1 || { fail=1; cat out; } +test $(grep -c 'virtfs2.*t2' <out) -eq 1 || { fail=1; cat out; } # Ensure that filtering duplicates does not affect -a processing. LD_PRELOAD=./k.so df -a >out || fail=1 |