>From 75409409f7b3fd9eff05ab193c067108d84b40e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Tue, 10 Dec 2013 16:29:11 +0000 Subject: [PATCH] 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 unknown. --- tests/df/total-unprocessed.sh | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/df/total-unprocessed.sh b/tests/df/total-unprocessed.sh index 24b83a9..650643d 100755 --- a/tests/df/total-unprocessed.sh +++ b/tests/df/total-unprocessed.sh @@ -28,8 +28,12 @@ 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 +# Note we don't check when the file system can't be determined +# as 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 -- 1.7.7.6