summaryrefslogtreecommitdiff
path: root/system/coreutils
diff options
context:
space:
mode:
authorMax Rees <maxcrees@me.com>2019-06-02 17:58:55 -0400
committerMax Rees <maxcrees@me.com>2019-09-28 13:27:48 -0500
commit37dc8b13f40d85ee22938ab60bbc6f03d823f593 (patch)
treec375f6468f8a8f0b9d51b3c05302fe85d7b2cc3e /system/coreutils
parent3b0612cdf8eef6408efe10cce2bc9e48d9c9d1fc (diff)
downloadpackages-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')
-rw-r--r--system/coreutils/APKBUILD4
-rw-r--r--system/coreutils/test-df-symlink-bindmount.patch11
2 files changed, 14 insertions, 1 deletions
diff --git a/system/coreutils/APKBUILD b/system/coreutils/APKBUILD
index ff7df9e00..2860b3a43 100644
--- a/system/coreutils/APKBUILD
+++ b/system/coreutils/APKBUILD
@@ -21,6 +21,7 @@ source="https://ftp.gnu.org/gnu/coreutils/$pkgname-$pkgver.tar.xz
gnulib-tests-dont-require-gpg-passphrase.patch
gnulib-test-fixes.patch
localename-test-fix.patch
+ test-df-symlink-bindmount.patch
"
[ "${CBUILD}" != "${CHOST}" ] && source="$source
051_all_coreutils-mangen.patch
@@ -73,7 +74,8 @@ bd8b5cecba59eba30458c8afa895877d39a987b989bc06b70cd6836e0ef684677aaadcb4949b58a7
86944e9ea5493c5b21ab62562a63aa134952738297b21cfb2e8f751db4a695ff25ee1592eb231ed1bb80999bc31f7504c7feffde2e93b4e068c05c44ac83cbdf localename-test-fix.patch
fd97fccd661befc558b3afb3e32c82dd2cef511a05e6129d49540599297c1b59ab1f109e63a12f585a2348c26c28fb98330c348829d1fe61cf8149d0dd1c989c gnulib-tests-dont-require-gpg-passphrase.patch
a1d014a683fb3b2e08e7392f7589fd92a565e2a4d0cac1cf960968dd3d990e020fdd3bb6aea2bbeaca3ba8f2522b4da3d75b93f414ebf83d8b26b5ccbb38a64d gnulib-test-fixes.patch
-aac3a89b27a7854fbf483e155df9133c3d33a0f36bd55d5606559a7781f9d27d5c17779ea427142311749252767097bf92ec22d4cf86b510568c186da84ff16c date-debug.patch"
+aac3a89b27a7854fbf483e155df9133c3d33a0f36bd55d5606559a7781f9d27d5c17779ea427142311749252767097bf92ec22d4cf86b510568c186da84ff16c date-debug.patch
+0b90b7721dd01bd22eba50f73bc756930dd4a8bc78ec408ce7f155a02b520375023897b9d12872030735d908208b912ea7adfac9e8b4d055e617873d982eef56 test-df-symlink-bindmount.patch"
[ "${CBUILD}" != "${CHOST}" ] && sha512sums="
bae804f057252c25452ac178c545dc2c4b4775cbfbdcfd4775edd1a4ed6507882bfac39e2b11ad01b74230ca48d761bf62f11bde5bcbc35a6e5a61cbe4a46e36 051_all_coreutils-mangen.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