coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] tests: cp/sparse-fiemap: use "seq 99q" in place of "head -99


From: Jim Meyering
Subject: Re: [PATCH] tests: cp/sparse-fiemap: use "seq 99q" in place of "head -99"
Date: Tue, 21 Jun 2011 11:02:58 +0200

Bernhard Voelker wrote:
> There was still an obsolete use of "head -[1-9]" in tests.
> The following patch replaces it.

Thanks, but actually no change is required there, since when running the
tests, we're guaranteed to be using coreutils' own version of "head".
By contrast, the just-fixed use in init.sh had no such protection, since
init.sh is used in other projects.

However, if you'd like to adjust your patch to make the test
use head -n99 instead (more readable than sed 99q and more future-proof
than "head -99", in case we stop supporting head -N), I'll apply it.

> From 8246020de1c8bbf24db2cc98a0df096f2e799452 Mon Sep 17 00:00:00 2001
> From: Bernhard Voelker <address@hidden>
> Date: Tue, 21 Jun 2011 10:10:39 +0200
> Subject: [PATCH] tests: cp/sparse-fiemap: use "seq 99q" in place of
> "head -99"
>
> * tests/cp/sparse-fiemap: Use "seq 99q" in place of "head -99".
> The latter is officially obsolete but more portable than "head -n99".
> ---
>  tests/cp/sparse-fiemap |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/tests/cp/sparse-fiemap b/tests/cp/sparse-fiemap
> index 3d34077..229ad78 100755
> --- a/tests/cp/sparse-fiemap
> +++ b/tests/cp/sparse-fiemap
> @@ -106,7 +106,7 @@ for i in $(seq 1 2 21); do
>          || {
>               warn_ ignoring filefrag-reported extent map differences
>               # Show the differing extent maps.
> -             head -99 ff1 ff2
> +             sed 99q ff1 ff2
>             }
>      fi
>      test $fail = 1 && break 2



reply via email to

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