diff options
author | Pádraig Brady <P@draigBrady.com> | 2013-12-10 16:29:11 +0000 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2013-12-11 14:15:33 +0000 |
commit | 77a24724f6172af157b09fdfb870a8f526f39424 (patch) | |
tree | c3c1bc8db7d420e0ceb62e14d4cdf2577eb8bb00 | |
parent | b95aac31803e64c766f4f0a097938366c7e3cee1 (diff) | |
download | coreutils-77a24724f6172af157b09fdfb870a8f526f39424.tar.xz |
tests: df/total-unprocessed: fix false failure with lofs
* tests/df/total-unprocessed.sh: Skip the test when we can't
determine the file system type as the exclusion filter is not
applied in that case. "lofs" being ignored is effectively
an unknown file system type.
-rwxr-xr-x | tests/df/total-unprocessed.sh | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/df/total-unprocessed.sh b/tests/df/total-unprocessed.sh index 24b83a935..3bbfc6bfb 100755 --- a/tests/df/total-unprocessed.sh +++ b/tests/df/total-unprocessed.sh @@ -25,11 +25,13 @@ cat <<\EOF > exp || framework_failure_ df: no file systems processed EOF -# The following simply finds no match for the combination -# of the options --local and FS-type nfs together with the -# argument ".". It must exit non-Zero nonetheless. -df -t _non_existent_fstype_ --total '.' 2>out && fail=1 -compare exp out || fail=1 +# Check we exit with non-Zero. +# Note we don't check when the file system can't be determined +# as -t filtering is not applied in that case. +if test "$(df --output=fstype . | tail -n1)" != '-'; then + df -t _non_existent_fstype_ --total . 2>out && fail=1 + compare exp out || fail=1 +fi cat <<\EOF > exp || framework_failure_ df: '_does_not_exist_': No such file or directory |