diff options
author | Max Rees <maxcrees@me.com> | 2019-06-02 17:58:55 -0400 |
---|---|---|
committer | Max Rees <maxcrees@me.com> | 2019-09-28 13:27:48 -0500 |
commit | 37dc8b13f40d85ee22938ab60bbc6f03d823f593 (patch) | |
tree | c375f6468f8a8f0b9d51b3c05302fe85d7b2cc3e /system/coreutils/test-df-symlink-bindmount.patch | |
parent | 3b0612cdf8eef6408efe10cce2bc9e48d9c9d1fc (diff) | |
download | packages-37dc8b13f40d85ee22938ab60bbc6f03d823f593.tar.gz packages-37dc8b13f40d85ee22938ab60bbc6f03d823f593.tar.bz2 packages-37dc8b13f40d85ee22938ab60bbc6f03d823f593.tar.xz packages-37dc8b13f40d85ee22938ab60bbc6f03d823f593.zip |
system/coreutils: fix test failure with bind mounts
df-symlink tests whether df output is consistent in regards to where
devices are mounted. Specifically, it tries to ensure that if there is a
1:1 mapping of the device ("source") corresponding to the current
directory "." ("target"), then `df --output=source,target .` should be
the same as `df --output=source,target $(df --out=source . | tail -n1)`.
However, this is not necessarily the case in the presence of bind
mounts. For example:
$ df --out=source .
Filesystem
/dev/sda4
$ df --out=source,target /dev/sda4
Filesystem Mounted on
/dev/sda4 /
$ df --out=source,target .
Filesystem Mounted on
/dev/sda4 /git
This can be fixed by adding the --all flag to ensure that duplicate
devices are printed, so that the 1:1-checking if statement actually
checks it correctly.
Diffstat (limited to 'system/coreutils/test-df-symlink-bindmount.patch')
-rw-r--r-- | system/coreutils/test-df-symlink-bindmount.patch | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/system/coreutils/test-df-symlink-bindmount.patch b/system/coreutils/test-df-symlink-bindmount.patch new file mode 100644 index 000000000..34b334ba8 --- /dev/null +++ b/system/coreutils/test-df-symlink-bindmount.patch @@ -0,0 +1,11 @@ +--- coreutils-8.31/tests/df/df-symlink.sh 2019-01-05 05:36:22.000000000 -0500 ++++ coreutils-8.31/tests/df/df-symlink.sh 2019-05-30 23:57:10.260506897 -0400 +@@ -34,7 +34,7 @@ + # I.e., '.' => /dev/mapper/fedora-home -> /dev/dm-2 + # Restrict this test to systems with a 1:1 mapping between + # source and target. This excludes for example BTRFS sub-volumes. +-if test "$(df --output=source | grep -F "$disk" | wc -l)" = 1; then ++if test "$(df --all --output=source | grep -F "$disk" | wc -l)" = 1; then + df --out=source,target '.' > out || fail=1 + compare exp out || fail=1 + fi |