diff options
author | Hans Jerry Illikainen <hji@dyntopia.com> | 2020-03-04 11:48:03 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-03-15 09:45:58 -0700 |
commit | f1e3df316992d32b17ee27385e4c644ef7b66cc1 (patch) | |
tree | 10db19138ba169fe822db9ab49dd2943bd2e4b2e /t/t3300-funny-names.sh | |
parent | Merge branch 'hi/gpg-use-check-signature' (diff) | |
download | tgif-f1e3df316992d32b17ee27385e4c644ef7b66cc1.tar.xz |
t: increase test coverage of signature verification output
There weren't any tests for unsuccessful signature verification of
signed merge tags shown in 'git log'. There also weren't any tests for
the GPG output from 'git fmt-merge-msg'. This was noticed while
investigating a buggy refactor that slipped through the test suite; see
commit 72b006f4bfd30b7c5037c163efaf279ab65bea9c.
This commit adds signature verification tests to the 'log' and
'fmt-merge-msg' builtins.
Thanks to Linus Torvalds for reporting and finding the (now reverted)
commit that introduced the regression.
Note that the "log --show-signature for merged tag with GPG failure"
test case is really hacky. It relies on an implementation detail of
verify_signed_buffer() -- namely, it assumes that the signature is
written to a temporary file whose path is under TMPDIR.
The rationale for that test case is to check whether the code path that
yields the "No signature" message is reachable on failure. The
functionality in log-tree.c that may show this message does some
pre-parsing of a possible signature that prevents the GPG interface from
being invoked if a signature is actually missing. And I haven't been
able to construct a signature that both 1. satisfies that
pre-processing, and 2. causes GPG to fail without any sort of output on
stderr along the lines of "this is a bogus/corrupt/... signature" (the
"No signature" message should only be shown if GPG produce no output).
Signed-off-by: Hans Jerry Illikainen <hji@dyntopia.com>
[jc: fixed missing test title noticed by Dscho]
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3300-funny-names.sh')
0 files changed, 0 insertions, 0 deletions