git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Kyle J. McKay <mackyle@gmail.com>
Date
Mar 9, 2015, 20:03 UTC
Message-ID
<b822f2716d8bdfcb6576ad0dc502af5@74d39fa044aa309eaea14b9f57fe79c>
In-Reply-To
<54FD6C22.4020808@drmicha.warpmail.net>

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 and the test still passes when "Warning: using insecure memory" shows up.

-Kyle
 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 &&
---
Previous: Michael J GruberNext: Michael J Gruber
Message 8 of 9 in “t7510: do not fail when gpg warns about insecure memory”
  1. t7510: do not fail when gpg warns about insecure memoryKyle J. McKay, Mar 8, 2015
  2. Eric SunshineMar 8, 2015
  3. brian m. carlsonMar 8, 2015
  4. Eric SunshineMar 8, 2015
  5. brian m. carlsonMar 9, 2015
  6. Kyle J. McKayMar 9, 2015
  7. Michael J GruberMar 9, 2015
  8. t7510: do not fail when gpg warns about insecure memoryKyle J. McKay, Mar 9, 2015
  9. Michael J GruberMar 10, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.