From patchwork Fri Feb 8 03:17:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Todd Zullinger X-Patchwork-Id: 10802397 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5335513BF for ; Fri, 8 Feb 2019 03:18:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3AC162E5AC for ; Fri, 8 Feb 2019 03:18:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 27F702E5DE; Fri, 8 Feb 2019 03:18:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B730B2E5AC for ; Fri, 8 Feb 2019 03:17:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726994AbfBHDR4 (ORCPT ); Thu, 7 Feb 2019 22:17:56 -0500 Received: from pb-smtp2.pobox.com ([64.147.108.71]:63103 "EHLO pb-smtp2.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726983AbfBHDRy (ORCPT ); Thu, 7 Feb 2019 22:17:54 -0500 Received: from pb-smtp2.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 70CB714484E; Thu, 7 Feb 2019 22:17:52 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; s=sasl; bh=sb0OmzuBB237boa9fug9dfJ3p +Y=; b=LbkKGH+rDWDH8601/t0hPiG4OKy27mQnB4TTVNqPEYubfxjmbDowmieAc 2jf1/cK2GFj6HcUuJKIV86zxGuvIR619KZjV6eSmSNqmaOZSoBGrdpUkTbGqHTkx HfPAMtdYLo8uQLdaTk5RqhVuohCPbg+Y/eTj+0il5xpruypE+I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; q=dns; s=sasl; b=d55wFmgECYFh376qPMk OUcAaZzB+dUEEUcXB5QpkTX5nDC6OgcBCmEjeYzbPB+Mu39R7P1TK+JqB8gXo0/H PppwkSi+DkuGPuNSbtQzvpEy4SxhxYMfTaoPtUSiaxUPYdIFEyCKtqbi9JI9bBaD koL/yeAMLiZQs3o+fZWsamwI= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 69FB014484D; Thu, 7 Feb 2019 22:17:52 -0500 (EST) Received: from morphine.paradise.teonanacatl.net (unknown [47.202.93.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id CCD5114484A; Thu, 7 Feb 2019 22:17:50 -0500 (EST) From: Todd Zullinger To: git@vger.kernel.org Cc: Henning Schild Subject: [PATCH 2/2] t/lib-gpg: drop redundant killing of gpg-agent Date: Thu, 7 Feb 2019 22:17:46 -0500 Message-Id: <20190208031746.22683-3-tmz@pobox.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190208031746.22683-1-tmz@pobox.com> References: <20190208031746.22683-1-tmz@pobox.com> MIME-Version: 1.0 X-Pobox-Relay-ID: 1E6E206A-2B50-11E9-8C30-DF19F34BB12D-09356542!pb-smtp2.pobox.com Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In 53fc999306 ("gpg-interface t: extend the existing GPG tests with GPGSM", 2018-07-20), the gpgconf call which kills gpg-agent was copied from the existing gpg setup code. The reason for killing gpg-agent is given in 29ff1f8f74 ("t: lib-gpg: flush gpg agent on startup", 2017-07-20): When running gpg-relevant tests, a gpg-daemon is spawned for each GNUPGHOME used. This daemon may stay running after the test and cache file descriptors for the trash directories, even after the trash directory is removed. This leads to ENOENT errors when attempting to create files if tests are run multiple times. Add a cleanup script to force flushing the gpg-agent for that GNUPGHOME (if any) before setting up the GPG relevant-environment. Killing gpg-agent once per test is sufficient. Signed-off-by: Todd Zullinger --- t/lib-gpg.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/t/lib-gpg.sh b/t/lib-gpg.sh index 207009793b..8d28652b72 100755 --- a/t/lib-gpg.sh +++ b/t/lib-gpg.sh @@ -64,7 +64,6 @@ then tr -d '\n' >"${GNUPGHOME}/trustlist.txt" && echo " S relax" >>"${GNUPGHOME}/trustlist.txt" && - (gpgconf --kill gpg-agent >/dev/null 2>&1 || : ) && echo hello | gpgsm --homedir "${GNUPGHOME}" >/dev/null \ -u committer@example.com -o /dev/null --sign - 2>&1 && test_set_prereq GPGSM