GNU bug report logs - #81138
[PATCH] Don't call `string-match' with a nil argument in mml-sec-tests.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Collin Funk <collin.funk1@HIDDEN>; Keywords: patch; dated Thu, 28 May 2026 03:07:04 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 81138 <at> debbugs.gnu.org:


Received: (at 81138) by debbugs.gnu.org; 28 May 2026 11:20:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 28 07:20:58 2026
Received: from localhost ([127.0.0.1]:33560 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wSYnJ-00010Z-Ur
	for submit <at> debbugs.gnu.org; Thu, 28 May 2026 07:20:58 -0400
Received: from fhigh-a5-smtp.messagingengine.com ([103.168.172.156]:57769)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>)
 id 1wSYnH-00010E-7G
 for 81138 <at> debbugs.gnu.org; Thu, 28 May 2026 07:20:56 -0400
Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44])
 by mailfhigh.phl.internal (Postfix) with ESMTP id C283C1400176;
 Thu, 28 May 2026 07:20:49 -0400 (EDT)
Received: from phl-frontend-04 ([10.202.2.163])
 by phl-compute-04.internal (MEProxy); Thu, 28 May 2026 07:20:49 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name;
 h=cc:content-type:content-type:date:date:from:from:in-reply-to
 :in-reply-to:message-id:mime-version:references:reply-to:subject
 :subject:to:to; s=fm2; t=1779967249; x=1780053649; bh=K/MVzvmJ5p
 NQaSWDEu/R7rF5aVUqcgf/52qA83WY+Bk=; b=aXrobfrlRaiPtNN6NAT6kwg31L
 JlNoTzKPqjuTe5Bg11m97rR3YdZ3qXOiuCmlbjHs3feydB1V9qPE0XyxmgL5ZF/v
 nLwivBViXmFZPqpSSQVumcx+vJ9pwYLmB9RB1ClJKdOlGY2+svgkBjbLZsd58lyE
 DF40eJyHwlj4aGg6vyGRJ0mJUjZqmfamt+ROVmZA40va7oTGt9citZiPfHWy+OWM
 pqLubdaXsmHID6r8qQMD1DFI8Av7dGAEY4uMgI4QVrdWU2lY45J3rwfa45gwYARV
 f6kIFAFBbKkV269Zzf47LVeMEAOXtTORZN5ItISHzUgQ/Av9hbiU2qoCzgzQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-type:content-type:date:date
 :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
 :message-id:mime-version:references:reply-to:subject:subject:to
 :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=
 1779967249; x=1780053649; bh=K/MVzvmJ5pNQaSWDEu/R7rF5aVUqcgf/52q
 A83WY+Bk=; b=k2U8DLeUe/GAp1EA8OmG9k7xw2NQMNtREH+rLyTicVWN2LW4Vgp
 7pU2L7dL3G4T2oiX7mbW+ETe4TaDRAJ3s2JOiY1hNqydZ8jf7wOsTKfa46s5Stn0
 SwoTEi/xjmx8O9t3Mzc5FP3I+KT+yGH0ZSQGFQh3lhJqpfu0SzNTDd37ukMgBUQs
 SzaKmOmmgHj5xRA/CHxvZcgZoZMvsGUsIlcqUe9FzWHJxU1RtEfQtIviwgZlsYKK
 iTthGGeeUgPC7LAqvazTUWhJ37kQUK0LaRKUbV9lLaGiourtrjt3npuXXV6usBhE
 bIMhnEw+LaHw0m63iKIxajYfs5dPvaQnPuw==
X-ME-Sender: <xms:ESUYahjLgpTqN5PSPjWB7XkoXcGUpXWKCaaVl6evCeV4ULtHvJPSKw>
 <xme:ESUYasCo26BK602WCbh1qwI7mQ3ovHX60L_TLT5BzRIXq1kOH7ICczmj9JNhiniL9
 9jzDHEv6FQB6o0kXffi8NF-Xbhva2xFvV9IJcrhWmJUblbrEWHAOQ>
X-ME-Received: <xmr:ESUYautPbBz0XKKE4NyzC9GmwV978mbpxq8H9a-UbWbIlhL1lDehfDNjqBi25ZoxivXB6-MC0icl>
X-ME-Proxy-Cause: dmFkZTGpMkoIyNu2piyjhangbp+2odA/T8njfx2HtyGydhuh+mCgHh/iSAhp0kXr0P2pqj
 NjCymIlEtBJevcT2xPjFF7Ves1muuTob4hlM5hM6UGgjgKu+wzlZ24ThZ64gep93tDNogi
 n+kmNK+k7e3mEvGGiWQdjc7WaGo3kzkly3xHZlMoB9lWRdCsHf3vwrR1aLE3E7QOmCNdHR
 LmQ1nO26I1lGK8LV0Th34Lguf6v3pOrpPS40HAWGGiZ9elrB+QxjSGd0XwwSb4WEe0eOQf
 Ckov2DXvm67meCq3Aiyil5tODVQyQi6vpmnbmx39/q9eSHKBCZUuAPaR2Ed6UsinuCT9SZ
 T3uubP7JW1nZtlw50W/Ey5OfDcKk5Gc3z3NMzfYSuqwzO2V965L31M9J9fgZVcHYChvKb1
 S1eP+ZetyVfkZWIK2/nIRZX2/W5Jwo0/ulAQ31BdvbdL8cglQtrKJwoXwmVkeik2wDdaIe
 cu4GQk1vNE1Y7CsA7PJLVeuxH86+bNhJkv/6MGdPHm5zjsZ3Ro78JkqH4qZk0q7m5dqizL
 1FzEetpCu7gBOWdaa/PpdXHammzNCpo5NQ9NioE1I0j2us38kKmGVliJ0JFHQr4257VDZq
 jku4/pfnk3/sH6DLFjEE4Y2+2P8+RQ9agbU/zkD4oQW31Zkg9cJQqnMXtXSQ
X-ME-Proxy: <xmx:ESUYahZyaQj7IJmGEFRZmjGtcTXMspY5NMg44OMSNO0rtXglDK3JCQ>
 <xmx:ESUYahXVc3sGOCKIEOkejDvTAXiL5eoihASTbvi74VChc3Q-kk2lkw>
 <xmx:ESUYal6DtuQ8DIshtcVFOmyI9NxZApxQOCsTtjVXRKaMuWY2YJ7T5Q>
 <xmx:ESUYasgV-dWngBlYSJEXblWwmqReLJ1XbN9CwVCXVZUnZTSWakFplw>
 <xmx:ESUYav-ZEBHu9oFIOczF1tApU4uT8OHFpvfxwIQN_KUfpaFbphaiMLJx>
Feedback-ID: i62564b17:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu,
 28 May 2026 07:20:49 -0400 (EDT)
Received: by melete.silentflame.com (Postfix, from userid 1000)
 id 8D51B7E670D; Thu, 28 May 2026 12:20:48 +0100 (BST)
From: Sean Whitton <spwhitton@HIDDEN>
To: Collin Funk <collin.funk1@HIDDEN>, 81138 <at> debbugs.gnu.org
Subject: Re: bug#81138: [PATCH] Don't call `string-match' with a nil
 argument in mml-sec-tests.
In-Reply-To: <87cxyg6xnq.fsf@HIDDEN>
References: <87cxyg6xnq.fsf@HIDDEN>
Date: Thu, 28 May 2026 12:20:48 +0100
Message-ID: <8733zbzsof.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81138
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Collin Funk [27/May  8:06pm -07] wrote:
> My theory is that there is a race when getting `args' for the result of
> `process-attributes' since it requires opening "proc/<PID>/cmdline",
> which does not exist after PID is killed. In that case `args' will be
> nil.

Just to be explicit, in the case where the race occurs, the process is
already dead so it's fine if mml-sec-test--kill-gpg-agent does nothing?

-- 
Sean Whitton




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81138; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 28 May 2026 03:06:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 27 23:06:21 2026
Received: from localhost ([127.0.0.1]:54990 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wSR4e-0000bp-6l
	for submit <at> debbugs.gnu.org; Wed, 27 May 2026 23:06:21 -0400
Received: from lists1p.gnu.org ([2001:470:142::17]:34158)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <collin.funk1@HIDDEN>)
 id 1wSR4Z-0000ZH-1s
 for submit <at> debbugs.gnu.org; Wed, 27 May 2026 23:06:16 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <collin.funk1@HIDDEN>)
 id 1wSR4R-0004l8-3s
 for bug-gnu-emacs@HIDDEN; Wed, 27 May 2026 23:06:07 -0400
Received: from mail-dl1-x122f.google.com ([2607:f8b0:4864:20::122f])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <collin.funk1@HIDDEN>)
 id 1wSR4P-0007LR-6o
 for bug-gnu-emacs@HIDDEN; Wed, 27 May 2026 23:06:06 -0400
Received: by mail-dl1-x122f.google.com with SMTP id
 a92af1059eb24-1363e78746eso8368635c88.1
 for <bug-gnu-emacs@HIDDEN>; Wed, 27 May 2026 20:06:04 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20251104; t=1779937563; x=1780542363; darn=gnu.org;
 h=mime-version:user-agent:message-id:date:subject:to:from:from:to:cc
 :subject:date:message-id:reply-to;
 bh=X1z9fBxaT0Jg1JXzFS9rPHLkPuE20zRw3m0ZRGdf1ys=;
 b=PTSykcBo0IuuZYu1FeIQV2Qi6FrqTgTkG59WNZHXZLlriRvyn1UrBFutw9eWnHWjDQ
 6id1ygZcPfzumsIhDbREj6nQSLSXa09TyaTDHv6/J0FJPWpcmvjrJHeLt1hXL/LtNnyy
 Akv3xqRvMn5PzOwf8tN/9OS6Znur7wbDkdvxsbq6sk2jTmLcQIIAcw5m2PsR7mNXU78P
 kBc5vbQBTXJo4w7BBzkuJOSofZ94mvR70PR5KEyZ+Sk3PWDmzmL5XH/wCfpGo/HdyuZ/
 NIipfg756BNKs0g1j6oApiDrIr+bwAY309bc6TvsLFcXKpPuqJmhglFaMMOd5K+h8/zM
 ts2g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20251104; t=1779937563; x=1780542363;
 h=mime-version:user-agent:message-id:date:subject:to:from:x-gm-gg
 :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=X1z9fBxaT0Jg1JXzFS9rPHLkPuE20zRw3m0ZRGdf1ys=;
 b=Mkef4BDZHiOvzfEnJaohx7ZLNa613mhG6y1Vz2GKC4fsHlwSTLHgGAm6p+kUVs27JQ
 6b7A4ocK8x1U+OYhd40vo4ClvMDVHxG02YjWueSZdWVVf8XOZuTg6POj7/EWLoEdYkhH
 cwZJeKFgugoOCBKrwQoOdO4Pva6vpT15lAJO0vFUuYJ8DPElwoobWI3hFZEn77sIhQ3h
 DUAPCn2uY6uhAg9yhKLmlRFQ6BlRLytq4ljuADtUBW1LNp4usgkTbyp6hTqnIJtu5t4X
 4zpl6T2mT/zGmpvxoSLc/lM5lmGRlKlLTz1nYda4fsxy3fbjEqYs+biQcpbK54+3a6k7
 39eQ==
X-Gm-Message-State: AOJu0Yxg4wiGjhnJki14vkQJcj4FUX3dvkviBYIG8TLDcCb+vQ9DHkuA
 w8H5J9CwK1/ObppSzea6aRHwZZCN5qZ/vh/SS2hKmxrwi8+33eFNA4yFnR9U1Q==
X-Gm-Gg: Acq92OHFRbb3JP7+k36SeCiLBscyTqrEVgA4KOW668B9tKbtKODtkfnfvgcqnmqzTot
 hL+t04JeoWpPlQvzF2XvIFQ4dHqvRXx6YA3QVRBq++HKNC0+6J/DdpUKqfVaX6DHIe6X7Pk4wru
 H8A5MF5KL+kxjIp1BdHDmOj+tzCDL/qX4h2TJ1Ez0lRSBSL7MA2n8mfIeQ9H22SzRVyHyqRv0QW
 eUr+OVvbGoFOe7m8gWdakhuMcpk9O2qSVWEG2spiHoH+wMN2TJdIxRvEqVAvI7wi+OlYJOvjqLy
 tjHFON3+4NVg43i2KUg+l7Tto2ppo/p4x0qwWr7Jpp/gGOLQstE98k0/XgpRrVfiQy6dwW6gpCh
 bsxVfiN375J0DGgRGHQVjLZfOaycnkxB2PBuXpW3L4hEywKoi8BVBxGwl12WWlUu1iq2wxTXxAx
 Gf66Ix5edLALsJjKsldM3iOF3yb9fSrOSJFw==
X-Received: by 2002:a05:7022:68a4:b0:137:1ae1:bc2e with SMTP id
 a92af1059eb24-1371ae1bebbmr3955150c88.11.1779937562794; 
 Wed, 27 May 2026 20:06:02 -0700 (PDT)
Received: from fedora ([2601:646:8081:3770:10ff:fc71:c346:9948])
 by smtp.gmail.com with ESMTPSA id
 a92af1059eb24-1366a2e672asm15425699c88.3.2026.05.27.20.06.01
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Wed, 27 May 2026 20:06:02 -0700 (PDT)
From: Collin Funk <collin.funk1@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: [PATCH] Don't call `string-match' with a nil argument in
 mml-sec-tests.
Date: Wed, 27 May 2026 20:06:01 -0700
Message-ID: <87cxyg6xnq.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Received-SPF: pass client-ip=2607:f8b0:4864:20::122f;
 envelope-from=collin.funk1@HIDDEN; helo=mail-dl1-x122f.google.com
X-Spam_score_int: -17
X-Spam_score: -1.8
X-Spam_bar: -
X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 2.2 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  On a Fedora GNU/Linux machine, I see a test failure along
 these lines almost every time that I run 'make check': $ make -j 16 check
 [...] Running 16 tests (2026-05-27 19:42:47-0700, selector `(not (or (tag
 :expensive-test) (tag :unstable)))') passed 1/16 mml-secure-en-decrypt-1
 (0.885271 sec) passed 2/16 mml-se [...] 
 Content analysis details:   (2.2 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [2001:470:142:0:0:0:0:17 listed in] [list.dnswl.org]
 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends
 in digit (collin.funk1[at]gmail.com)
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (collin.funk1[at]gmail.com)
 1.0 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
 1.0 FORGED_GMAIL_RCVD      'From' gmail.com does not match 'Received'
 headers
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.2 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  On a Fedora GNU/Linux machine, I see a test failure along
   these lines almost every time that I run 'make check': $ make -j 16 check
   [...] Running 16 tests (2026-05-27 19:42:47-0700, selector `(not (or (tag
   :expensive-test) (tag :unstable)))') passed 1/16 mml-secure-en-decrypt-1 (0.885271
    sec) passed 2/16 mml-se [...] 
 
 Content analysis details:   (1.2 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [2001:470:142:0:0:0:0:17 listed in]
                             [list.dnswl.org]
  0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends
                             in digit (collin.funk1[at]gmail.com)
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
                             provider (collin.funk1[at]gmail.com)
  1.0 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
  1.0 FORGED_GMAIL_RCVD      'From' gmail.com does not match 'Received'
                             headers
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

--=-=-=
Content-Type: text/plain

On a Fedora GNU/Linux machine, I see a test failure along these lines
almost every time that I run 'make check':

    $ make -j 16 check
    [...]
    Running 16 tests (2026-05-27 19:42:47-0700, selector `(not (or (tag :expensive-test) (tag :unstable)))')
       passed   1/16  mml-secure-en-decrypt-1 (0.885271 sec)
       passed   2/16  mml-secure-en-decrypt-2 (0.980539 sec)
       passed   3/16  mml-secure-en-decrypt-3 (0.932382 sec)
    Test mml-secure-en-decrypt-4 backtrace:
      string-match("homedir.*/home/collin/\\.local/src/emacs/test/lisp/gnu
      mml-sec-test--kill-gpg-agent()
      #f(compiled-function () #<bytecode 0x18c0f6fa4fd1>)()
      mml-secure-test-fixture(#f(compiled-function () #<bytecode -0xc230fa
      mml-secure-test-mail-fixture(enc-pgp "no-exp@HIDDEN" "sub@examp
      mml-secure-test-en-decrypt(enc-pgp "no-exp@HIDDEN" "sub@example
      #f(compiled-function () #<bytecode -0x12c4a6081583ff29>)()
      #f(compiled-function () #<bytecode 0x16879d9236423234>)()
      handler-bind-1(#f(compiled-function () #<bytecode 0x16879d9236423234
      ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
      ert-run-test(#s(ert-test :name mml-secure-en-decrypt-4 :documentatio
      ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-m
      ert-run-tests((not (or (tag :expensive-test) (tag :unstable))) #f(co
      ert-run-tests-batch((not (or (tag :expensive-test) (tag :unstable)))
      ert-run-tests-batch-and-exit((not (or (tag :expensive-test) (tag :un
      eval((ert-run-tests-batch-and-exit '(not (or (tag :expensive-test) (
      command-line-1(("-L" ":." "-l" "ert" "--eval" "(setq treesit-extra-l
      command-line()
      normal-top-level()
    Test mml-secure-en-decrypt-4 condition:
        (wrong-type-argument stringp nil)
       FAILED   4/16  mml-secure-en-decrypt-4 (0.436019 sec) at lisp/gnus/mml-sec-tests.el:620
      skipped   5/16  mml-secure-en-decrypt-passphrase-cache (0.000071 sec)
      skipped   6/16  mml-secure-en-decrypt-passphrase-no-cache-openpgp-todo (0.000043 sec)
       failed   7/16  mml-secure-en-decrypt-passphrase-no-cache-smime-todo (0.000040 sec)
       passed   8/16  mml-secure-find-usable-keys-1 (0.189355 sec)
       passed   9/16  mml-secure-find-usable-keys-2 (0.200949 sec)
       passed  10/16  mml-secure-key-checks (0.207074 sec)
       passed  11/16  mml-secure-select-preferred-keys-1 (0.157166 sec)
       passed  12/16  mml-secure-select-preferred-keys-2 (0.167602 sec)
       passed  13/16  mml-secure-select-preferred-keys-3 (0.154852 sec)
       passed  14/16  mml-secure-select-preferred-keys-4 (0.174772 sec)
    Test mml-secure-sign-verify-1 backtrace:
      string-match("homedir.*/home/collin/\\.local/src/emacs/test/lisp/gnu
      mml-sec-test--kill-gpg-agent()
      #f(compiled-function () #<bytecode 0x18c0f6fa4fd1>)()
      mml-secure-test-fixture(#f(compiled-function () #<bytecode 0x1a66ff2
      mml-secure-test-mail-fixture(sign-pgp "uid1@HIDDEN" "sub@exampl
      mml-secure-test-en-decrypt(sign-pgp "uid1@HIDDEN" "sub@example.
      #f(compiled-function () #<bytecode -0x354c56a2ed6d745>)()
      #f(compiled-function () #<bytecode -0x131b9e1ecb1d2a5c>)()
      mml-secure-test-fixture(#f(compiled-function () #<bytecode -0x131b9e
      mml-secure-test-key-fixture(#f(compiled-function () #<bytecode -0x35
      #f(compiled-function () #<bytecode 0x1ba4f1e2ddc0e53>)()
      #f(compiled-function () #<bytecode 0x16879d9236423234>)()
      handler-bind-1(#f(compiled-function () #<bytecode 0x16879d9236423234
      ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
      ert-run-test(#s(ert-test :name mml-secure-sign-verify-1 :documentati
      ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-m
      ert-run-tests((not (or (tag :expensive-test) (tag :unstable))) #f(co
      ert-run-tests-batch((not (or (tag :expensive-test) (tag :unstable)))
      ert-run-tests-batch-and-exit((not (or (tag :expensive-test) (tag :un
      eval((ert-run-tests-batch-and-exit '(not (or (tag :expensive-test) (
      command-line-1(("-L" ":." "-l" "ert" "--eval" "(setq treesit-extra-l
      command-line()
      normal-top-level()
    Test mml-secure-sign-verify-1 condition:
        (wrong-type-argument stringp nil)
       FAILED  15/16  mml-secure-sign-verify-1 (0.519720 sec) at lisp/gnus/mml-sec-tests.el:747
       passed  16/16  mml-secure-sign-verify-3 (0.317910 sec)
    
    Ran 16 tests, 12 results as expected, 2 unexpected, 2 skipped (2026-05-27 19:42:53-0700, 5.453456 sec)
    1 expected failures
    
    2 unexpected results:
       FAILED  mml-secure-en-decrypt-4
       FAILED  mml-secure-sign-verify-1
    
    2 skipped results:
      SKIPPED  mml-secure-en-decrypt-passphrase-cache
      SKIPPED  mml-secure-en-decrypt-passphrase-no-cache-openpgp-todo

I have not been able to reproduce this with the attached patch in use.

My theory is that there is a race when getting `args' for the result of
`process-attributes' since it requires opening "proc/<PID>/cmdline",
which does not exist after PID is killed. In that case `args' will be
nil.

Collin


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=0001-Don-t-call-string-match-with-a-nil-argument-in-mml-s.patch

From 9d0bdd54a97c678c529e74e56ca562fbea6b50de Mon Sep 17 00:00:00 2001
Message-ID: <9d0bdd54a97c678c529e74e56ca562fbea6b50de.1779937166.git.collin.funk1@HIDDEN>
From: Collin Funk <collin.funk1@HIDDEN>
Date: Wed, 27 May 2026 19:52:12 -0700
Subject: [PATCH] Don't call `string-match' with a nil argument in
 mml-sec-tests.

* test/lisp/gnus/mml-sec-tests.el (mml-sec-test--kill-gpg-agent): Check
that the `args' returned by `process-attributes' are not nil before
calling `string-match'.
---
 test/lisp/gnus/mml-sec-tests.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/test/lisp/gnus/mml-sec-tests.el b/test/lisp/gnus/mml-sec-tests.el
index 6cd03206204..6b1e23007c3 100644
--- a/test/lisp/gnus/mml-sec-tests.el
+++ b/test/lisp/gnus/mml-sec-tests.el
@@ -881,15 +881,17 @@ mml-secure-run-tests-without-smime
 
 (defun mml-sec-test--kill-gpg-agent ()
   (dolist (pid (list-system-processes))
-    (let ((atts (process-attributes pid)))
-      (when (and (equal (cdr (assq 'user atts)) (user-login-name))
+    (let* ((atts (process-attributes pid))
+           (args (cdr (assq 'args atts))))
+      (when (and args
+                 (equal (cdr (assq 'user atts)) (user-login-name))
                  (or (equal (cdr (assq 'comm atts)) "gpg-agent")
 		     (equal (cdr (assq 'comm atts)) "scdaemon"))
                  (string-match
                   (concat "homedir.*"
                           (regexp-quote (directory-file-name
                                          (ert-resource-directory))))
-                  (cdr (assq 'args atts))))
+                  args))
         (call-process "kill" nil nil nil (format "%d" pid))))))
 
 ;;; mml-sec-tests.el ends here
-- 
2.54.0


--=-=-=--




Acknowledgement sent to Collin Funk <collin.funk1@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#81138; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 28 May 2026 11:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.