[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] tests: avoid false df failure with nfs and lofs
From: |
Bernhard Voelker |
Subject: |
Re: [PATCH] tests: avoid false df failure with nfs and lofs |
Date: |
Mon, 09 Dec 2013 08:44:46 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 |
On 12/09/2013 02:06 AM, Pádraig Brady wrote:
> * tests/df/total-unprocessed.sh: -t nfs and --local are
> _not_ mutually exclusive on solaris, with lofs mounts.
> ---
> tests/df/total-unprocessed.sh | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/tests/df/total-unprocessed.sh b/tests/df/total-unprocessed.sh
> index f6885d5..a1ce2c7 100755
> --- a/tests/df/total-unprocessed.sh
> +++ b/tests/df/total-unprocessed.sh
> @@ -21,6 +21,9 @@
> print_ver_ df
> require_mount_list_
>
> +# This is the case with lofs and nfs on the same mount point
> +df --local -t nfs . 2>/dev/null && skip_ 'both nfs and local'
> +
> cat <<\EOF > exp || framework_failure_
> df: no file systems processed
> EOF
Hmm, while it seems tempting to check the prerequisite for the test
following that way, it does look odd, because the test is exactly
proving the opposite:
# 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 --local -t nfs --total '.' 2>out && fail=1
compare exp out || fail=1
In that test, we want to provoke the "no file systems processed"
diagnostic. Wouldn't it be better to avoid NFS completely, and
instead test with a non-existent file system type?
# 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 --local -t nfs --total '.' 2>out && fail=1
+df -t _non_existent_fstype_ --total '.' 2>out && fail=1
compare exp out || fail=1
Thanks & have a nice day,
Berny