coreutils
[Top][All Lists]
Advanced

[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: Tue, 10 Dec 2013 19:17:36 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0

On 12/10/2013 05:47 PM, Pádraig Brady wrote:
> On 12/09/2013 09:12 AM, Pádraig Brady wrote:
>> On 12/09/2013 07:44 AM, Bernhard Voelker wrote:
>>> df -t _non_existent_fstype_ --total '.'
>>
>> Much better.
>> That still works on the old buggy version.
> 
> But doesn't actually work when the file system type is unknown,
> which is actually the degenerate case with "lofs" as that's
> explicitly ignored (since FILEUTILS-4_0q-24-g5624900).

ugh ;-(

> I'm not sure we should output the file system for a path,
> when the type is unknown and -t is specified ?
> I vaguely remember discussing this before and I'm
> not on for changing just before release,
> so I'll probably just apply the attached test workaround for now.


> From 75409409f7b3fd9eff05ab193c067108d84b40e1 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?P=C3=A1draig=20Brady?= <address@hidden>
> 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.

Sorry, this is probably due to my limited English, but I can't
parse the last short sentence. What does it mean?

> ---
>  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.

The comment above does not match the code since the
last commit: we don't test on --local -t nfs anymore.

> -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

+1 otherwise.

Thanks & have a nice day,
Berny



reply via email to

[Prev in Thread] Current Thread [Next in Thread]