From cbed4b33762d9e42f403f3b5d15650ae925faa64 Mon Sep 17 00:00:00 2001 From: Assaf Gordon Date: Fri, 27 Mar 2015 09:38:48 +0000 Subject: 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 --- tests/df/skip-duplicates.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'tests/df') 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 || fail=1 -- cgit v1.2.3-70-g09d2