From 1b1c40e1d6f8cf30b6c7c9d31bbddbc3d5cc72e6 Mon Sep 17 00:00:00 2001 From: Pádraig Brady Date: Sun, 5 Apr 2015 18:21:38 +0100 Subject: df: fix --local hanging with inaccessible remote mounts * src/df.c (filter_mount_list): With -l, avoid stating remote mounts. * init.cfg: Avoid test hangs with inaccessible remote mounts. * tests/df/no-mtab-status.sh: Skip with inaccessible remote mounts. * tests/df/skip-rootfs.sh: Likewise. * tests/df/total-verify.sh: Likewise. * NEWS: Mention the bug fix. Reported at http://bugzilla.redhat.com/1199679 --- tests/df/no-mtab-status.sh | 3 ++- tests/df/skip-rootfs.sh | 3 ++- tests/df/total-verify.sh | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/df/no-mtab-status.sh b/tests/df/no-mtab-status.sh index 0c1bec8ef..49d12558d 100755 --- a/tests/df/no-mtab-status.sh +++ b/tests/df/no-mtab-status.sh @@ -21,7 +21,8 @@ print_ver_ df require_gcc_shared_ -df || skip_ "df fails" +# Protect against inaccessible remote mounts etc. +timeout 10 df || skip_ "df fails" grep '^#define HAVE_MNTENT_H 1' $CONFIG_HEADER > /dev/null \ || skip_ "no mntent.h available to confirm the interface" diff --git a/tests/df/skip-rootfs.sh b/tests/df/skip-rootfs.sh index a3b68e9b2..43ba70b43 100755 --- a/tests/df/skip-rootfs.sh +++ b/tests/df/skip-rootfs.sh @@ -19,7 +19,8 @@ . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src print_ver_ df -df || skip_ "df fails" +# Protect against inaccessible remote mounts etc. +timeout 10 df || skip_ "df fails" # Verify that rootfs is in mtab (and shown when the -a option is specified). # Note this is the case when /proc/self/mountinfo is parsed diff --git a/tests/df/total-verify.sh b/tests/df/total-verify.sh index 86c6217de..ba50b03c3 100755 --- a/tests/df/total-verify.sh +++ b/tests/df/total-verify.sh @@ -20,7 +20,8 @@ print_ver_ df require_perl_ -df || skip_ "df fails" +# Protect against inaccessible remote mounts etc. +timeout 10 df || skip_ "df fails" cat <<\EOF > check-df || framework_failure_ my ($total, $used, $avail) = (0, 0, 0); -- cgit v1.2.3-70-g09d2