mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
tests: avoid false failure with BTRFS subvolumes
* tests/df/df-symlink.sh: Only check the symmetry of the source <-> target lookup, when the source is only mounted once, which isn't the case if '.' is a BTRFS subvolume for example. Reported by Assaf Gordon on a default OpenSUSE 42.1 install.
This commit is contained in:
1 parent
0d60653001
commit
2a5494271c
1 file changed
+6
-2
@@ -32,7 +32,11 @@ compare exp out || fail=1
|
||||
# This was not the case in coreutil-8.22 on systems
|
||||
# where the device in the mount list was a symlink itself.
|
||||
# I.e., '.' => /dev/mapper/fedora-home -> /dev/dm-2
|
||||
df --out=source,target '.' > out || fail=1
|
||||
compare exp out || fail=1
|
||||
# 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
|
||||
df --out=source,target '.' > out || fail=1
|
||||
compare exp out || fail=1
|
||||
fi
|
||||
|
||||
Exit $fail
|
||||
Reference in new issue
Block a user