Re: [PATCH v2] t7510: do not fail when gpg warns about insecure memory

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

 



Kyle J. McKay venit, vidit, dixit 09.03.2015 21:03:
> Depending on how gpg was built, it may issue the following
> message to stderr when run:
> 
>   Warning: using insecure memory!
> 
> When the test is collecting gpg output it is therefore not
> enough to just match on a "gpg: " prefix it must also match
> on a "Warning: " prefix wherever it needs to match lines
> that have been produced by gpg.
> 
> Signed-off-by: Kyle J. McKay <mackyle@xxxxxxxxx>
> ---
> 
> How about this patch instead.  It just treats "Warning:" lines as gpg  
> output

(They are, but gpg fails tp prefix them.)

> and the test still passes when "Warning: using insecure memory"  
> shows up.
> 
> -Kyle

Perfect, thanks!

>  t/t7510-signed-commit.sh | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/t/t7510-signed-commit.sh b/t/t7510-signed-commit.sh
> index 474dab38..3cef18cf 100755
> --- a/t/t7510-signed-commit.sh
> +++ b/t/t7510-signed-commit.sh
> @@ -86,8 +86,8 @@ test_expect_success GPG 'show signed commit with signature' '
>  	git show -s --show-signature initial >show &&
>  	git verify-commit -v initial >verify.1 2>verify.2 &&
>  	git cat-file commit initial >cat &&
> -	grep -v "gpg: " show >show.commit &&
> -	grep "gpg: " show >show.gpg &&
> +	grep -v -e "gpg: " -e "Warning: " show >show.commit &&
> +	grep -e "gpg: " -e "Warning: " show >show.gpg &&
>  	grep -v "^ " cat | grep -v "^gpgsig " >cat.commit &&
>  	test_cmp show.commit commit &&
>  	test_cmp show.gpg verify.2 &&
> ---
> 
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]