diff options
| author | Pádraig Brady <P@draigBrady.com> | 2024-10-02 16:43:34 +0100 |
|---|---|---|
| committer | Pádraig Brady <P@draigBrady.com> | 2024-10-02 16:43:34 +0100 |
| commit | 851064b4c790b38a7fc2b96344e53fb59b58edde (patch) | |
| tree | be170b81c17ffb5f1a869ee5a43bc8fe6f4799ae /tests | |
| parent | tests: fix skipping of mtab simulation tests (diff) | |
| download | coreutils-851064b4c790b38a7fc2b96344e53fb59b58edde.tar.gz coreutils-851064b4c790b38a7fc2b96344e53fb59b58edde.zip | |
tests: df: avoid false failure due to fuse.portal
* tests/df/skip-rootfs.sh: Explicitly exclude "fuse.portal"
file systems as these give EPERM errors from statfs().
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/df/skip-rootfs.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/df/skip-rootfs.sh b/tests/df/skip-rootfs.sh index 96a48b416..66f7afef9 100755 --- a/tests/df/skip-rootfs.sh +++ b/tests/df/skip-rootfs.sh @@ -22,10 +22,13 @@ print_ver_ df # Protect against inaccessible remote mounts etc. timeout 10 df || skip_ "df fails" +# Exclude "fuse.portal" as this currently returns EPERM from statfs() +DF_a() { df -a -x fuse.portal "$@"; } + # Verify that rootfs is in mtab (and shown when the -a option is specified). # Note this is the case when /proc/self/mountinfo is parsed # rather than /proc/mounts. I.e., when libmount is being used. -df -a >out || fail=1 +DF_a >out || fail=1 grep '^rootfs' out || skip_ 'no rootfs in mtab' # Ensure that rootfs is suppressed when no options is specified. @@ -40,12 +43,12 @@ grep '^rootfs' out && { fail=1; cat out; } # Ensure that the rootfs is shown when explicitly both specifying "-t rootfs" # and the -a option. -df -t rootfs -a >out || fail=1 +DF_a -t rootfs >out || fail=1 grep '^rootfs' out || { fail=1; cat out; } # Ensure that the rootfs is omitted in all_fs mode when it is explicitly # black-listed. -df -a -x rootfs >out || fail=1 +DF_a -x rootfs >out || fail=1 grep '^rootfs' out && { fail=1; cat out; } test "$fail" = 1 && dump_mount_list_ |
