git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] t7510: do not fail when gpg warns about insecure memory
@ 2015-03-08 15:40 Kyle J. McKay
  2015-03-08 21:43 ` Eric Sunshine
  0 siblings, 1 reply; 9+ messages in thread
From: Kyle J. McKay @ 2015-03-08 15:40 UTC (permalink / raw)
  To: Junio C Hamano, Michael J Gruber; +Cc: Git mailing list

Depending on how gpg was built, it may issue the following
message to stderr when run:

  Warning: using insecure memory!

Unfortunately when running the test, that message gets
collected in the stdout result of git show -s --show-signature
but is collected in the stderr result of git verify-commit -v
causing both the stdout and stderr result comparisions to fail.

Since checking for secure memory use by gpg is not the point of
this test, filter out such messages to allow the test to pass
even when gpg is "using insecure memory".

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
---
 t/t7510-signed-commit.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/t/t7510-signed-commit.sh b/t/t7510-signed-commit.sh
index 474dab38..e86923bc 100755
--- a/t/t7510-signed-commit.sh
+++ b/t/t7510-signed-commit.sh
@@ -84,9 +84,10 @@ test_expect_success GPG 'verify and show signatures' '
 test_expect_success GPG 'show signed commit with signature' '
 	git show -s initial >commit &&
 	git show -s --show-signature initial >show &&
-	git verify-commit -v initial >verify.1 2>verify.2 &&
+	git verify-commit -v initial >verify.1 2>verify.2.out &&
 	git cat-file commit initial >cat &&
-	grep -v "gpg: " show >show.commit &&
+	grep -v -e "gpg: " -e "insecure memory" show >show.commit &&
+	grep -v "insecure memory" verify.2.out >verify.2 &&
 	grep "gpg: " show >show.gpg &&
 	grep -v "^ " cat | grep -v "^gpgsig " >cat.commit &&
 	test_cmp show.commit commit &&
---

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-03-10  9:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).