diff -u coreutils-8.23/debian/changelog coreutils-8.23/debian/changelog --- coreutils-8.23/debian/changelog +++ coreutils-8.23/debian/changelog @@ -1,3 +1,11 @@ +coreutils (8.23-3ubuntu1.1) vivid; urgency=medium + + * Add support for correctly processing /proc/self/mountinfo. + * Fix df to prioritize mounts of the root of a device over bind mounts. + (LP: #1432871) + + -- Dave Chiluk Wed, 30 Sep 2015 21:06:59 +0000 + coreutils (8.23-3ubuntu1) vivid; urgency=low * Merge from Debian unstable. Remaining changes: diff -u coreutils-8.23/debian/patches/00list coreutils-8.23/debian/patches/00list --- coreutils-8.23/debian/patches/00list +++ coreutils-8.23/debian/patches/00list @@ -10,0 +11 @@ +99_mountinfo only in patch2: unchanged: --- coreutils-8.23.orig/debian/patches/99_mountinfo.dpatch +++ coreutils-8.23/debian/patches/99_mountinfo.dpatch @@ -0,0 +1,518 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 99_mountinfo.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Make df prioritize fileystem root mounts over bind mounts +## DP: Pulled in enablement for /proc/self/mountinfo in order to succeed in above +## DP: Please see pad.lv/1432871 for more info +## +## Bug-Ubuntu: http://pad.lv/1432871 +## Auther: Dave Chiluk +## Origin: upstream, gnulib - http://git.savannah.gnu.org/gitweb/?p=gnulib.git +## commit: http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commit;h=3ea43e02541ece750ffc6cd1dfe34195421b4ef3 +## commit: http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commit;h=2768ceb7994506e2cfba88be3b6bd13ef5440a90 +## commit: http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commit;h=de1cbdd48244c66c51a3e2bc1594ac3ad32ce038 +## commit: http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commit;h=3fb6e360363744462ce15c381f0b116c6fc4ce82 +## commit: http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commit;h=c6148bca89e9465fd6ba3a10d273ec4cb58c2dbe +## Origin: upstream, coreutils - http://git.savannah.gnu.org/gitweb/?p=coreutils.git +## commit: http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commit;h=1b1c40e1d6f8cf30b6c7c9d31bbddbc3d5cc72e6 +## commit: http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commit;h=3babaf83875ceac896c8dd3a64248e955dfecef9 + +@DPATCH@ +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' coreutils-8.23~/ChangeLog coreutils-8.23/ChangeLog +--- coreutils-8.23~/ChangeLog 2015-10-01 17:08:13.000000000 -0500 ++++ coreutils-8.23/ChangeLog 2015-10-01 17:10:23.778341177 -0500 +@@ -1,3 +1,59 @@ ++2015-09-08 Dave Chiluk ++ ++ mountlist: add me_mntroot field on Linux machines ++ * lib/mountlist.c (read_file_system_list): Populate me_mntroot in ++ mount_entry so Linux machines based on /proc/self/mountinfo can ++ distinguish between bind mounts and original mounts. In reality bind ++ mounts aren't treated differently than mountroot=/ mounts by the ++ kernel, but the user often wants these bind mounts distinguished. ++ * lib/mountlist.h (struct mount_entry): Add me_mntroot element. ++ More details at https://pad.lv/1432871 ++ ++2015-04-02 Pádraig Brady ++ ++ mountlist: remove dependency on libmount ++ * lib/mountlist.c (read_file_system_list): Parse /proc/self/mountinfo ++ directly, rather than depending on libmount, which has many ++ dependencies due to its dependence on libselinux, as detailed at: ++ http://lists.gnu.org/archive/html/bug-gnulib/2015-01/msg00063.html ++ Note we restrict this to __linux__ as that's probably where this ++ interface will remain. If ever porting, it would be best ++ to first pull the makedev() wrapper from coreutils to a gnulib module. ++ Note also we don't add a getline dependency to the mountlist module, ++ as all Linux versions are sufficient. ++ ++2015-02-11 Pádraig Brady ++ ++ mountlist: only use libmount when specified ++ There are currently many shared libs dependencies introduced by ++ libmount with associated runtime and virt mem overhead. ++ Therefore don't enable by default. ++ * m4/ls-mntd-fs.m4: Use --with-libmount to enable at build time. ++ ++2014-10-30 Pádraig Brady ++ ++ mountlist: don't use libmount to decide on dummy/remote ++ * lib/mountlist.c (read_file_system_list): Don't use the libmount ++ routines to determine whether a file system is dummy or remote, ++ as they're not currently compatible. For example the remoteness ++ is determined on file system type (for which the list seems incomplete), ++ rather than simply checking for a ':' in the device name. ++ Also libmount currently determines that 'tmpfs' is a dummy file system ++ even though it has associated storage. ++ ++2014-09-09 Fridolin Pokorny ++ ++ mountlist: use /proc/self/mountinfo when available ++ Use libmount to propagate device IDs provided by Linux in ++ /proc/self/mountinfo. This will give more accurate output when ++ using df in chroot'ed environments as the device IDs are not ++ determined by stat() which may be inaccurate within the chroot. ++ * lib/mountlist.c (read_file_system_list): Use the libmount routines ++ from util-linux to parse "/proc/self/mountinfo" or fall back to ++ standard getmntent() processing. ++ * m4/ls-mntd-fs.m4: Check for libmount only when 1-argument ++ getmntent() is used, as is the case on GNU/Linux. ++ + 2014-07-18 Pádraig Brady + + version 8.23 +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' coreutils-8.23~/NEWS coreutils-8.23/NEWS +--- coreutils-8.23~/NEWS 2015-10-01 17:09:13.000000000 -0500 ++++ coreutils-8.23/NEWS 2015-10-01 17:10:23.782341184 -0500 +@@ -154,6 +154,9 @@ + as these are probably explicitly mounted and may have separate ACLs etc. + [suppression was introduced in coreutils-8.21] + ++ df now prefers sources towards the root of a device when ++ eliding duplicate bind mounted entries. ++ + ** Improvements + + chroot has better --userspec and --group look-ups, with numeric IDs never +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' coreutils-8.23~/init.cfg coreutils-8.23/init.cfg +--- coreutils-8.23~/init.cfg 2015-10-01 17:08:13.000000000 -0500 ++++ coreutils-8.23/init.cfg 2015-10-01 17:10:23.782341184 -0500 +@@ -79,7 +79,7 @@ + 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" + } + +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' coreutils-8.23~/lib/mountlist.c coreutils-8.23/lib/mountlist.c +--- coreutils-8.23~/lib/mountlist.c 2015-10-01 17:08:13.000000000 -0500 ++++ coreutils-8.23/lib/mountlist.c 2015-10-01 17:10:23.778341177 -0500 +@@ -58,6 +58,7 @@ + + #ifdef MOUNTED_GETMNTENT1 /* 4.3BSD, SunOS, HP-UX, Dynix, Irix. */ + # include ++# include + # if !defined MOUNTED + # if defined _PATH_MOUNTED /* GNU libc */ + # define MOUNTED _PATH_MOUNTED +@@ -177,10 +178,9 @@ + we grant an exception to any with "bind" in its list of mount options. + I.e., those are *not* dummy entries. */ + #ifdef MOUNTED_GETMNTENT1 +-# define ME_DUMMY(Fs_name, Fs_type, Fs_ent) \ ++# define ME_DUMMY(Fs_name, Fs_type, Bind) \ + (ME_DUMMY_0 (Fs_name, Fs_type) \ +- || (strcmp (Fs_type, "none") == 0 \ +- && !hasmntopt (Fs_ent, "bind"))) ++ || (strcmp (Fs_type, "none") == 0 && !Bind)) + #else + # define ME_DUMMY(Fs_name, Fs_type) \ + (ME_DUMMY_0 (Fs_name, Fs_type) || strcmp (Fs_type, "none") == 0) +@@ -383,6 +383,34 @@ + + #endif + ++#if defined MOUNTED_GETMNTENT1 && defined __linux__ ++ ++/* Unescape the paths in mount tables. ++ STR is updated in place. */ ++ ++static void ++unescape_tab (char *str) ++{ ++ size_t i, j = 0; ++ size_t len = strlen (str) + 1; ++ for (i = 0; i < len; i++) ++ { ++ if (str[i] == '\\' && (i + 4 < len) ++ && str[i + 1] >= '0' && str[i + 1] <= '3' ++ && str[i + 2] >= '0' && str[i + 2] <= '7' ++ && str[i + 3] >= '0' && str[i + 3] <= '7') ++ { ++ str[j++] = (str[i + 1] - '0') * 64 + ++ (str[i + 2] - '0') * 8 + ++ (str[i + 3] - '0'); ++ i += 3; ++ } ++ else ++ str[j++] = str[i]; ++ } ++} ++#endif ++ + /* Return a list of the currently mounted file systems, or NULL on error. + Add each entry to the tail of the list so that they stay in order. + If NEED_FS_TYPE is true, ensure that the file system type fields in +@@ -415,6 +443,7 @@ + me = xmalloc (sizeof *me); + me->me_devname = xstrdup (mnt->mnt_fsname); + me->me_mountdir = xstrdup (mnt->mnt_dir); ++ me->me_mntroot = NULL; + me->me_type = xstrdup (mnt->mnt_type); + me->me_type_malloced = 1; + me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); +@@ -429,32 +458,132 @@ + + #ifdef MOUNTED_GETMNTENT1 /* GNU/Linux, 4.3BSD, SunOS, HP-UX, Dynix, Irix. */ + { +- struct mntent *mnt; +- char const *table = MOUNTED; + FILE *fp; + +- fp = setmntent (table, "r"); +- if (fp == NULL) +- return NULL; +- +- while ((mnt = getmntent (fp))) ++#ifdef __linux__ ++ /* Try parsing mountinfo first, as that make device IDs available. ++ Note we could use libmount routines to simplify this parsing a little ++ (and that code is in previous versions of this function), however ++ libmount depends on libselinux which pulls in many dependencies. */ ++ char const *mountinfo = "/proc/self/mountinfo"; ++ fp = fopen (mountinfo, "r"); ++ if (fp != NULL) + { +- me = xmalloc (sizeof *me); +- me->me_devname = xstrdup (mnt->mnt_fsname); +- me->me_mountdir = xstrdup (mnt->mnt_dir); +- me->me_type = xstrdup (mnt->mnt_type); +- me->me_type_malloced = 1; +- me->me_dummy = ME_DUMMY (me->me_devname, me->me_type, mnt); +- me->me_remote = ME_REMOTE (me->me_devname, me->me_type); +- me->me_dev = dev_from_mount_options (mnt->mnt_opts); ++ char *line = NULL; ++ size_t buf_size = 0; + +- /* Add to the linked list. */ +- *mtail = me; +- mtail = &me->me_next; ++ while (getline (&line, &buf_size, fp) != -1) ++ { ++ unsigned int devmaj, devmin; ++ int target_s, target_e, type_s, type_e; ++ int source_s, source_e, mntroot_s, mntroot_e; ++ char test; ++ char *dash; ++ int rc; ++ ++ rc = sscanf(line, "%*u " /* id - discarded */ ++ "%*u " /* parent - discarded */ ++ "%u:%u " /* dev major:minor */ ++ "%n%*s%n " /* mountroot */ ++ "%n%*s%n" /* target, start and end */ ++ "%c", /* more data... */ ++ &devmaj, &devmin, ++ &mntroot_s, &mntroot_e, ++ &target_s, &target_e, ++ &test); ++ ++ if (rc != 3 && rc != 7) /* 7 if %n included in count. */ ++ continue; ++ ++ /* skip optional fields, terminated by " - " */ ++ dash = strstr (line + target_e, " - "); ++ if (! dash) ++ continue; ++ ++ rc = sscanf(dash, " - " ++ "%n%*s%n " /* FS type, start and end */ ++ "%n%*s%n " /* source, start and end */ ++ "%c", /* more data... */ ++ &type_s, &type_e, ++ &source_s, &source_e, ++ &test); ++ if (rc != 1 && rc != 5) /* 5 if %n included in count. */ ++ continue; ++ ++ /* manipulate the sub-strings in place. */ ++ line[mntroot_e] = '\0'; ++ line[target_e] = '\0'; ++ dash[type_e] = '\0'; ++ dash[source_e] = '\0'; ++ unescape_tab (dash + source_s); ++ unescape_tab (line + target_s); ++ unescape_tab (line + mntroot_s); ++ ++ me = xmalloc (sizeof *me); ++ ++ me->me_devname = xstrdup (dash + source_s); ++ me->me_mountdir = xstrdup (line + target_s); ++ me->me_mntroot = xstrdup (line + mntroot_s); ++ me->me_type = xstrdup (dash + type_s); ++ me->me_type_malloced = 1; ++ me->me_dev = makedev (devmaj, devmin); ++ /* we pass "false" for the "Bind" option as that's only ++ significant when the Fs_type is "none" which will not be ++ the case when parsing "/proc/self/mountinfo", and only ++ applies for static /etc/mtab files. */ ++ me->me_dummy = ME_DUMMY (me->me_devname, me->me_type, false); ++ me->me_remote = ME_REMOTE (me->me_devname, me->me_type); ++ ++ /* Add to the linked list. */ ++ *mtail = me; ++ mtail = &me->me_next; ++ } ++ ++ free (line); ++ ++ if (ferror (fp)) ++ { ++ int saved_errno = errno; ++ fclose (fp); ++ errno = saved_errno; ++ goto free_then_fail; ++ } ++ ++ if (fclose (fp) == EOF) ++ goto free_then_fail; + } ++ else /* fallback to /proc/self/mounts (/etc/mtab). */ ++#endif /* __linux __ */ ++ { ++ struct mntent *mnt; ++ char const *table = MOUNTED; + +- if (endmntent (fp) == 0) +- goto free_then_fail; ++ fp = setmntent (table, "r"); ++ if (fp == NULL) ++ return NULL; ++ ++ while ((mnt = getmntent (fp))) ++ { ++ bool bind = hasmntopt (mnt, "bind"); ++ ++ me = xmalloc (sizeof *me); ++ me->me_devname = xstrdup (mnt->mnt_fsname); ++ me->me_mountdir = xstrdup (mnt->mnt_dir); ++ me->me_mntroot = NULL; ++ me->me_type = xstrdup (mnt->mnt_type); ++ me->me_type_malloced = 1; ++ me->me_dummy = ME_DUMMY (me->me_devname, me->me_type, bind); ++ me->me_remote = ME_REMOTE (me->me_devname, me->me_type); ++ me->me_dev = dev_from_mount_options (mnt->mnt_opts); ++ ++ /* Add to the linked list. */ ++ *mtail = me; ++ mtail = &me->me_next; ++ } ++ ++ if (endmntent (fp) == 0) ++ goto free_then_fail; ++ } + } + #endif /* MOUNTED_GETMNTENT1. */ + +@@ -473,6 +602,7 @@ + me = xmalloc (sizeof *me); + me->me_devname = xstrdup (fsp->f_mntfromname); + me->me_mountdir = xstrdup (fsp->f_mntonname); ++ me->me_mntroot = NULL; + me->me_type = fs_type; + me->me_type_malloced = 0; + me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); +@@ -499,6 +629,7 @@ + me = xmalloc (sizeof *me); + me->me_devname = xstrdup (fsp->f_mntfromname); + me->me_mountdir = xstrdup (fsp->f_mntonname); ++ me->me_mntroot = NULL; + me->me_type = xstrdup (fsp->f_fstypename); + me->me_type_malloced = 1; + me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); +@@ -525,6 +656,7 @@ + me = xmalloc (sizeof *me); + me->me_devname = xstrdup (fsd.fd_req.devname); + me->me_mountdir = xstrdup (fsd.fd_req.path); ++ me->me_mntroot = NULL; + me->me_type = gt_names[fsd.fd_req.fstype]; + me->me_type_malloced = 0; + me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); +@@ -623,6 +755,7 @@ + me->me_devname = xstrdup (fi.device_name[0] != '\0' + ? fi.device_name : fi.fsh_name); + me->me_mountdir = xstrdup (re != NULL ? re->name : fi.fsh_name); ++ me->me_mntroot = NULL; + me->me_type = xstrdup (fi.fsh_name); + me->me_type_malloced = 1; + me->me_dev = fi.dev; +@@ -672,6 +805,7 @@ + me = xmalloc (sizeof *me); + me->me_devname = xstrdup (stats[counter].f_mntfromname); + me->me_mountdir = xstrdup (stats[counter].f_mntonname); ++ me->me_mntroot = NULL; + me->me_type = xstrdup (FS_TYPE (stats[counter])); + me->me_type_malloced = 1; + me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); +@@ -708,6 +842,7 @@ + strcpy (me->me_devname + 5, mnt.mt_dev); + # endif + me->me_mountdir = xstrdup (mnt.mt_filsys); ++ me->me_mntroot = NULL; + me->me_dev = (dev_t) -1; /* Magic; means not known yet. */ + me->me_type = ""; + me->me_type_malloced = 0; +@@ -755,6 +890,7 @@ + me = xmalloc (sizeof *me); + me->me_devname = xstrdup ((*ent)->mt_resource); + me->me_mountdir = xstrdup ((*ent)->mt_directory); ++ me->me_mntroot = NULL; + me->me_type = xstrdup ((*ent)->mt_fstype); + me->me_type_malloced = 1; + me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); +@@ -817,6 +953,7 @@ + me = xmalloc (sizeof *me); + me->me_devname = xstrdup (mnt.mnt_special); + me->me_mountdir = xstrdup (mnt.mnt_mountp); ++ me->me_mntroot = NULL; + me->me_type = xstrdup (mnt.mnt_fstype); + me->me_type_malloced = 1; + me->me_dummy = MNT_IGNORE (&mnt) != 0; +@@ -893,6 +1030,7 @@ + vmp->vmt_data[VMT_OBJECT].vmt_off); + } + me->me_mountdir = xstrdup (thisent + vmp->vmt_data[VMT_STUB].vmt_off); ++ me->me_mntroot = NULL; + me->me_type = xstrdup (fstype_to_string (vmp->vmt_gfstype)); + me->me_type_malloced = 1; + options = thisent + vmp->vmt_data[VMT_ARGS].vmt_off; +@@ -936,6 +1074,7 @@ + me = xmalloc (sizeof *me); + me->me_devname = xstrdup (dev.f_mntfromname); + me->me_mountdir = xstrdup (dev.f_mntonname); ++ me->me_mntroot = NULL; + me->me_type = xstrdup (dev.f_fstypename); + me->me_type_malloced = 1; + me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); +@@ -978,6 +1117,7 @@ + { + free (me->me_devname); + free (me->me_mountdir); ++ free (me->me_mntroot); + if (me->me_type_malloced) + free (me->me_type); + free (me); +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' coreutils-8.23~/lib/mountlist.h coreutils-8.23/lib/mountlist.h +--- coreutils-8.23~/lib/mountlist.h 2015-10-01 17:08:13.000000000 -0500 ++++ coreutils-8.23/lib/mountlist.h 2015-10-01 17:10:23.778341177 -0500 +@@ -27,6 +27,8 @@ + { + char *me_devname; /* Device node name, including "/dev/". */ + char *me_mountdir; /* Mount point directory name. */ ++ char *me_mntroot; /* Directory on filesystem of device used */ ++ /* as root for the (bind) mount. */ + char *me_type; /* "nfs", "4.2", etc. */ + dev_t me_dev; /* Device number of me_mountdir. */ + unsigned int me_dummy : 1; /* Nonzero for dummy file systems. */ +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' coreutils-8.23~/src/df.c coreutils-8.23/src/df.c +--- coreutils-8.23~/src/df.c 2015-10-01 17:09:13.000000000 -0500 ++++ coreutils-8.23/src/df.c 2015-10-01 17:10:23.782341184 -0500 +@@ -622,13 +622,16 @@ + 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 +@@ -640,6 +643,13 @@ + + if (devlist) + { ++ bool target_nearer_root = strlen (devlist->me->me_mountdir) ++ > strlen (me->me_mountdir); ++ /* With bind mounts, prefer items nearer the root of the device */ ++ bool target_nearer_device_root = ! (devlist->me->me_mntroot != NULL ++ && me->me_mntroot != NULL ++ && (strlen (devlist->me->me_mntroot) ++ < strlen(me->me_mntroot))); + if (me->me_remote && devlist->me->me_remote + && ! STREQ (devlist->me->me_devname, me->me_devname)) + { +@@ -650,9 +660,8 @@ + else if ((strchr (me->me_devname, '/') + /* let "real" devices with '/' in the name win. */ + && ! strchr (devlist->me->me_devname, '/')) +- /* let a shorter mountdir win. */ +- || (strlen (devlist->me->me_mountdir) +- > strlen (me->me_mountdir)) ++ /* let points towards the root of the device win. */ ++ || (target_nearer_root && target_nearer_device_root) + /* let an entry overmounted on a new device win... */ + || (! STREQ (devlist->me->me_devname, me->me_devname) + /* ... but only when matching an existing mnt point, +} +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' coreutils-8.23~/tests/df/no-mtab-status.sh coreutils-8.23/tests/df/no-mtab-status.sh +--- coreutils-8.23~/tests/df/no-mtab-status.sh 2015-10-01 17:08:13.000000000 -0500 ++++ coreutils-8.23/tests/df/no-mtab-status.sh 2015-10-01 17:10:23.782341184 -0500 +@@ -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 -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' coreutils-8.23~/tests/df/skip-rootfs.sh coreutils-8.23/tests/df/skip-rootfs.sh +--- coreutils-8.23~/tests/df/skip-rootfs.sh 2015-10-01 17:08:13.000000000 -0500 ++++ coreutils-8.23/tests/df/skip-rootfs.sh 2015-10-01 17:10:23.782341184 -0500 +@@ -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). + df -a >out || fail=1 +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' coreutils-8.23~/tests/df/total-verify.sh coreutils-8.23/tests/df/total-verify.sh +--- coreutils-8.23~/tests/df/total-verify.sh 2015-10-01 17:08:13.000000000 -0500 ++++ coreutils-8.23/tests/df/total-verify.sh 2015-10-01 17:10:23.782341184 -0500 +@@ -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);