public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Michael J Gruber <git@drmicha•warpmail.net>
To: "Kyle J. McKay" <mackyle@gmail•com>
Cc: "brian m. carlson" <sandals@crustytoothpaste•net>,
	Eric Sunshine <sunshine@sunshineco•com>,
	Junio C Hamano <gitster@pobox•com>,
	Git mailing list <git@vger•kernel.org>
Subject: Re: [PATCH v2] t7510: do not fail when gpg warns about insecure memory
Date: Tue, 10 Mar 2015 10:10:13 +0100	[thread overview]
Message-ID: <54FEB4F5.4060602@drmicha.warpmail.net> (raw)
In-Reply-To: <b822f2716d8bdfcb6576ad0dc502af5@74d39fa044aa309eaea14b9f57fe79c>

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@gmail•com>
> ---
> 
> 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 &&
> ---
> 

      reply	other threads:[~2015-03-10  9:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-08 15:40 [PATCH] t7510: do not fail when gpg warns about insecure memory Kyle J. McKay
2015-03-08 21:43 ` Eric Sunshine
2015-03-08 22:04   ` brian m. carlson
2015-03-08 22:15     ` Eric Sunshine
2015-03-09  1:22       ` brian m. carlson
2015-03-09  5:32         ` Kyle J. McKay
2015-03-09  9:47           ` Michael J Gruber
2015-03-09 20:03             ` [PATCH v2] " Kyle J. McKay
2015-03-10  9:10               ` Michael J Gruber [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54FEB4F5.4060602@drmicha.warpmail.net \
    --to=git@drmicha$(echo .)warpmail.net \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitster@pobox$(echo .)com \
    --cc=mackyle@gmail$(echo .)com \
    --cc=sandals@crustytoothpaste$(echo .)net \
    --cc=sunshine@sunshineco$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox