From 031fff289a52d7a0f8ead7390b67468122f49bec Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 22 Aug 2023 15:03:14 +0200 Subject: [PATCH 1/2] t/lib-gpg: forcibly run a trustdb update We want to compare output later, so randomly popping up 'gpg: checking the trustdb' breaks the tests. Run the trustdb update forcibly. Signed-off-by: Christian Hesse Signed-off-by: Junio C Hamano --- t/lib-gpg.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/t/lib-gpg.sh b/t/lib-gpg.sh index 4eebd9c2b5..83b83c9abb 100644 --- a/t/lib-gpg.sh +++ b/t/lib-gpg.sh @@ -45,6 +45,7 @@ test_lazy_prereq GPG ' "$TEST_DIRECTORY"/lib-gpg/keyring.gpg && gpg --homedir "${GNUPGHOME}" --import-ownertrust \ "$TEST_DIRECTORY"/lib-gpg/ownertrust && + gpg --homedir "${GNUPGHOME}" --update-trustdb && gpg --homedir "${GNUPGHOME}" /dev/null \ --sign -u committer@example.com ;; From d0fc552bfcc20dcb001f78e83b0138ea4374a8c1 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 22 Aug 2023 15:03:15 +0200 Subject: [PATCH 2/2] t/t6300: drop magic filtering Now that we ran a trustdb check forcibly, it no longer pollutes the output, and filtering is no longer required. Signed-off-by: Christian Hesse Signed-off-by: Junio C Hamano --- t/t6300-for-each-ref.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/t/t6300-for-each-ref.sh b/t/t6300-for-each-ref.sh index 5b434ab451..aa3c7c03c4 100755 --- a/t/t6300-for-each-ref.sh +++ b/t/t6300-for-each-ref.sh @@ -1763,10 +1763,7 @@ test_expect_success GPGSSH 'setup for signature atom using ssh' ' ' test_expect_success GPG2 'bare signature atom' ' - git verify-commit first-signed 2>out.raw && - grep -Ev "checking the trustdb|PGP trust model" out.raw >out && - head -3 out >expect && - tail -1 out >>expect && + git verify-commit first-signed 2>expect && echo >>expect && git for-each-ref refs/tags/first-signed \ --format="%(signature)" >actual &&