* [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
* Re: [PATCH] t7510: do not fail when gpg warns about insecure memory 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 0 siblings, 1 reply; 9+ messages in thread From: Eric Sunshine @ 2015-03-08 21:43 UTC (permalink / raw) To: Kyle J. McKay; +Cc: Junio C Hamano, Michael J Gruber, Git mailing list On Sun, Mar 8, 2015 at 11:40 AM, Kyle J. McKay <mackyle@gmail.com> wrote: > 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 I'm having trouble parsing this. Is there a word missing? > causing both the stdout and stderr result comparisions to fail. s/comparisions/comparisons/ > 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> ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] t7510: do not fail when gpg warns about insecure memory 2015-03-08 21:43 ` Eric Sunshine @ 2015-03-08 22:04 ` brian m. carlson 2015-03-08 22:15 ` Eric Sunshine 0 siblings, 1 reply; 9+ messages in thread From: brian m. carlson @ 2015-03-08 22:04 UTC (permalink / raw) To: Eric Sunshine Cc: Kyle J. McKay, Junio C Hamano, Michael J Gruber, Git mailing list [-- Attachment #1: Type: text/plain, Size: 1104 bytes --] On Sun, Mar 08, 2015 at 05:43:41PM -0400, Eric Sunshine wrote: >On Sun, Mar 8, 2015 at 11:40 AM, Kyle J. McKay <mackyle@gmail.com> wrote: >> 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 > >I'm having trouble parsing this. Is there a word missing? > >> causing both the stdout and stderr result comparisions to fail. Perhaps this is better? Unfortunately when running the test, that message is found in the standard output of git show -s --show-signature, but in the standard error of git verify-commit -v causing the comparisons of both standard output and standard error to fail. -- brian m. carlson / brian with sandals: Houston, Texas, US +1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187 [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] t7510: do not fail when gpg warns about insecure memory 2015-03-08 22:04 ` brian m. carlson @ 2015-03-08 22:15 ` Eric Sunshine 2015-03-09 1:22 ` brian m. carlson 0 siblings, 1 reply; 9+ messages in thread From: Eric Sunshine @ 2015-03-08 22:15 UTC (permalink / raw) To: brian m. carlson, Eric Sunshine, Kyle J. McKay, Junio C Hamano, Michael J Gruber, Git mailing list On Sun, Mar 8, 2015 at 6:04 PM, brian m. carlson <sandals@crustytoothpaste.net> wrote: > On Sun, Mar 08, 2015 at 05:43:41PM -0400, Eric Sunshine wrote: >> On Sun, Mar 8, 2015 at 11:40 AM, Kyle J. McKay <mackyle@gmail.com> wrote: >>> 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 >> >> I'm having trouble parsing this. Is there a word missing? > Perhaps this is better? > > Unfortunately when running the test, that message is found in the standard > output of git show -s --show-signature, but in the standard error of git > verify-commit -v causing the comparisons of both standard output and > standard error to fail. That doesn't help me parse it any better. It's the "but" without a corresponding "not" which seems to be throwing me off. Typically, one would write "this but not that" or "not this but that". I can't tell if there is a "not" missing or if the "but" is supposed to be an "and" or if something else was intended. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] t7510: do not fail when gpg warns about insecure memory 2015-03-08 22:15 ` Eric Sunshine @ 2015-03-09 1:22 ` brian m. carlson 2015-03-09 5:32 ` Kyle J. McKay 0 siblings, 1 reply; 9+ messages in thread From: brian m. carlson @ 2015-03-09 1:22 UTC (permalink / raw) To: Eric Sunshine Cc: Kyle J. McKay, Junio C Hamano, Michael J Gruber, Git mailing list [-- Attachment #1: Type: text/plain, Size: 1366 bytes --] On Sun, Mar 08, 2015 at 06:15:55PM -0400, Eric Sunshine wrote: >On Sun, Mar 8, 2015 at 6:04 PM, brian m. carlson ><sandals@crustytoothpaste.net> wrote: >> Perhaps this is better? >> >> Unfortunately when running the test, that message is found in the standard >> output of git show -s --show-signature, but in the standard error of git >> verify-commit -v causing the comparisons of both standard output and >> standard error to fail. > >That doesn't help me parse it any better. It's the "but" without a >corresponding "not" which seems to be throwing me off. Typically, one >would write "this but not that" or "not this but that". I can't tell >if there is a "not" missing or if the "but" is supposed to be an "and" >or if something else was intended. The intended meaning is "and" with the additional sense of contrast. The sentence, if read with verbal emphasis, is, "…is found in the standard *output* of git show -s --signature, but in the standard *error* of git verify-commit -v", thus demonstrating why the test fails: the pairs of output files don't match up. Maybe you can suggest a less confusing wording. -- brian m. carlson / brian with sandals: Houston, Texas, US +1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187 [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] t7510: do not fail when gpg warns about insecure memory 2015-03-09 1:22 ` brian m. carlson @ 2015-03-09 5:32 ` Kyle J. McKay 2015-03-09 9:47 ` Michael J Gruber 0 siblings, 1 reply; 9+ messages in thread From: Kyle J. McKay @ 2015-03-09 5:32 UTC (permalink / raw) To: Eric Sunshine Cc: Junio C Hamano, brian m. carlson, Michael J Gruber, Git mailing list On Mar 8, 2015, at 18:22, brian m. carlson wrote: > On Sun, Mar 08, 2015 at 06:15:55PM -0400, Eric Sunshine wrote: >> On Sun, Mar 8, 2015 at 6:04 PM, brian m. carlson >> <sandals@crustytoothpaste.net> wrote: >>> Perhaps this is better? >>> >>> Unfortunately when running the test, that message is found in the >>> standard >>> output of git show -s --show-signature, but in the standard error >>> of git >>> verify-commit -v causing the comparisons of both standard output >>> and >>> standard error to fail. >> >> That doesn't help me parse it any better. It's the "but" without a >> corresponding "not" which seems to be throwing me off. Typically, one >> would write "this but not that" or "not this but that". I can't tell >> if there is a "not" missing or if the "but" is supposed to be an >> "and" >> or if something else was intended. > > The intended meaning is "and" with the additional sense of contrast. > The sentence, if read with verbal emphasis, is, "…is found in the > standard *output* of git show -s --signature, but in the standard > *error* of git verify-commit -v", thus demonstrating why the test > fails: the pairs of output files don't match up. > > Maybe you can suggest a less confusing wording. I like Brian's wording, but how about this slight variation, does this parse any better for you? Unfortunately when running the test, while that message is found in the standard output of git show -s --show-signature, it is found in the standard error of git verify-commit -v causing the comparisons of both standard output and standard error to fail. -Kyle ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] t7510: do not fail when gpg warns about insecure memory 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 0 siblings, 1 reply; 9+ messages in thread From: Michael J Gruber @ 2015-03-09 9:47 UTC (permalink / raw) To: Kyle J. McKay, Eric Sunshine Cc: Junio C Hamano, brian m. carlson, Git mailing list Kyle J. McKay venit, vidit, dixit 09.03.2015 06:32: > On Mar 8, 2015, at 18:22, brian m. carlson wrote: > >> On Sun, Mar 08, 2015 at 06:15:55PM -0400, Eric Sunshine wrote: >>> On Sun, Mar 8, 2015 at 6:04 PM, brian m. carlson >>> <sandals@crustytoothpaste.net> wrote: >>>> Perhaps this is better? >>>> >>>> Unfortunately when running the test, that message is found in the >>>> standard >>>> output of git show -s --show-signature, but in the standard error >>>> of git >>>> verify-commit -v causing the comparisons of both standard output >>>> and >>>> standard error to fail. >>> >>> That doesn't help me parse it any better. It's the "but" without a >>> corresponding "not" which seems to be throwing me off. Typically, one >>> would write "this but not that" or "not this but that". I can't tell >>> if there is a "not" missing or if the "but" is supposed to be an >>> "and" >>> or if something else was intended. >> >> The intended meaning is "and" with the additional sense of contrast. >> The sentence, if read with verbal emphasis, is, "…is found in the >> standard *output* of git show -s --signature, but in the standard >> *error* of git verify-commit -v", thus demonstrating why the test >> fails: the pairs of output files don't match up. >> >> Maybe you can suggest a less confusing wording. > > I like Brian's wording, but how about this slight variation, does this > parse any better for you? > > Unfortunately when running the test, while that message is found in > the standard output of git show -s --show-signature, it is found in > the standard error of git verify-commit -v causing the comparisons > of both standard output and standard error to fail. > > -Kyle > That still makes it sound as if we'd rather fix "git show" than adjust the test to such surprising behavior. But in fact, "git verify-commit" uses stdout and stderr to separate its output appropriately, whereas "git show" lumps everything together on stdout, so that the test has to split it up again. Now, if I read it correctly, the patch suggests ignoring the insecure memory warning from both outputs rather than putting it on the correct side of the split. I'd rather put it on the correct side (or silence gpg by setting its config). Michael ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2] t7510: do not fail when gpg warns about insecure memory 2015-03-09 9:47 ` Michael J Gruber @ 2015-03-09 20:03 ` Kyle J. McKay 2015-03-10 9:10 ` Michael J Gruber 0 siblings, 1 reply; 9+ messages in thread From: Kyle J. McKay @ 2015-03-09 20:03 UTC (permalink / raw) To: Michael J Gruber Cc: brian m. carlson, Eric Sunshine, Junio C Hamano, Git mailing list 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 && --- ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v2] t7510: do not fail when gpg warns about insecure memory 2015-03-09 20:03 ` [PATCH v2] " Kyle J. McKay @ 2015-03-10 9:10 ` Michael J Gruber 0 siblings, 0 replies; 9+ messages in thread From: Michael J Gruber @ 2015-03-10 9:10 UTC (permalink / raw) To: Kyle J. McKay Cc: brian m. carlson, Eric Sunshine, Junio C Hamano, Git mailing list 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 && > --- > ^ permalink raw reply [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).