* 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
dd supports more robust SIGINFO/SIGUSR1 handling for outputting statistics.
Previously those signals may have inadvertently terminated the process.
+ df --local no longer hangs with inaccessible remote mounts.
+ [bug introduced in coreutils-8.21]
+
du now silently ignores all directory cycles due to bind mounts.
Previously it would issue a warning and exit with a failure status.
[bug introduced in coreutils-8.1 and partially fixed in coreutils-8.23]
require_mount_list_()
{
local mount_list_fail='cannot read table of mounted file systems'
- df 2>&1 | grep -F "$mount_list_fail" >/dev/null &&
+ df --local 2>&1 | grep -F "$mount_list_fail" >/dev/null &&
skip_ "$mount_list_fail"
}
struct devlist *devlist;
struct mount_entry *discard_me = NULL;
- /* TODO: On Linux we might avoid this stat() and another in get_dev()
+ /* Avoid stating remote file systems as that may hang.
+ TODO: On Linux we might avoid this stat() and another in get_dev()
by using the device IDs available from /proc/self/mountinfo.
read_file_system_list() could populate me_dev from those
for efficiency and accuracy. */
- if (-1 == stat (me->me_mountdir, &buf))
+ if ((me->me_remote && show_local_fs)
+ || -1 == stat (me->me_mountdir, &buf))
{
- /* Stat failed - add ME to be able to complain about it later. */
+ /* If remote, and showing just local, add ME for filtering later.
+ If stat failed; add ME to be able to complain about it later. */
buf.st_dev = me->me_dev;
}
else
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"
. "${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
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);