Pádraig Brady wrote:

> On 24/02/11 07:52, Jim Meyering wrote:
>> One quick question: does the test need
>> something to make it skip (not fail)
>> on systems that lack kernel support for the feature?
>
> Oops right.
> Attached is latest version.
...
> +# Advise to drop cache for whole file
> +if ! dd if=ifile iflag=nocache count=0 2>err; then
> +  if grep -F 'Operation not supported' err >/dev/null; then
> +     warn_ 'skipping part; this file system lacks support for 
> posix_fadvise()'
> +     skip=1
> +  else
> +    fail=1
> +  fi
> +fi

Thanks for the quick fix.
That looks fine, but I'd drop the use of -F,
since it's just an optimization in this case, and
probably not portable to some crufty targets.

Hmm.. but I see uses of grep -F in other tests and
even in bootstrap, so maybe it's not a problem, these days:

    $ git grep -l grep.-F
    bootstrap
    tests/cp/cp-mv-enotsup-xattr
    tests/cp/fiemap-perf
    tests/misc/xattr

Reply via email to