coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] tests: avoid a failure when there isn't a name for all user


From: Pádraig Brady
Subject: Re: [PATCH] tests: avoid a failure when there isn't a name for all user IDs
Date: Sun, 22 Sep 2013 04:20:50 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2

On 09/22/2013 02:53 AM, Pádraig Brady wrote:
> * tests/misc/id-zero.sh: Don't check exit status when in -n mode.
> 
> Prompted by the continuous integration build failure at:
> http://hydra.nixos.org/build/6196762
> ---
>  tests/misc/id-zero.sh |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/misc/id-zero.sh b/tests/misc/id-zero.sh
> index cef5672..61a2c07 100755
> --- a/tests/misc/id-zero.sh
> +++ b/tests/misc/id-zero.sh
> @@ -49,8 +49,10 @@ while read u ; do
>      for n in '' n ; do
>        printf   '%s: ' "id -${o}${n}[z] $u" >> exp || framework_failure_
>        printf '\n%s: ' "id -${o}${n}[z] $u" >> out || framework_failure_
> -      id -${o}${n}  $u >> exp || fail=1
> -      id -${o}${n}z $u  > tmp || fail=1
> +      # There may be no name corresponding to an id, so don't check
> +      # exit status when in name lookup mode
> +      id -${o}${n}  $u >> exp || { test -z "$n" && fail=1; }
> +      id -${o}${n}z $u  > tmp || { test -z "$n" && fail=1; }
>        head -c-1 < tmp >> out || framework_failure_
>      done
>    done
> 
pushed and the CI builds succeed again.



reply via email to

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