From 37dc8b13f40d85ee22938ab60bbc6f03d823f593 Mon Sep 17 00:00:00 2001 From: Max Rees Date: Sun, 2 Jun 2019 17:58:55 -0400 Subject: 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. --- system/coreutils/test-df-symlink-bindmount.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 system/coreutils/test-df-symlink-bindmount.patch (limited to 'system/coreutils/test-df-symlink-bindmount.patch') 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 -- cgit v1.2.3-60-g2f50