From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "J.P." Newsgroups: gmane.emacs.bugs Subject: bug#72004: 30.0.50, master: 'erc--check-prompt-input-for-multiline-blanks' test fail Date: Thu, 11 Jul 2024 00:10:16 -0700 Message-ID: <87cynkv1yf.fsf__40257.1708242007$1720681897$gmane$org@neverwas.me> References: <86o776ztb9.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18707"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , emacs-erc@gnu.org, 72004@debbugs.gnu.org To: Andrea Corallo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 11 09:11:28 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sRnxf-0004bm-4r for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 11 Jul 2024 09:11:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sRnxJ-0000j6-Ks; Thu, 11 Jul 2024 03:11:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sRnxI-0000in-2D for bug-gnu-emacs@gnu.org; Thu, 11 Jul 2024 03:11:04 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sRnxH-0000Kw-Pa for bug-gnu-emacs@gnu.org; Thu, 11 Jul 2024 03:11:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sRnxG-0002kN-AQ for bug-gnu-emacs@gnu.org; Thu, 11 Jul 2024 03:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "J.P." Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Jul 2024 07:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72004 X-GNU-PR-Package: emacs Original-Received: via spool by 72004-submit@debbugs.gnu.org id=B72004.172068182810511 (code B ref 72004); Thu, 11 Jul 2024 07:11:02 +0000 Original-Received: (at 72004) by debbugs.gnu.org; 11 Jul 2024 07:10:28 +0000 Original-Received: from localhost ([127.0.0.1]:50792 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sRnwi-0002jS-0X for submit@debbugs.gnu.org; Thu, 11 Jul 2024 03:10:28 -0400 Original-Received: from mail-108-mta116.mxroute.com ([136.175.108.116]:43115) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sRnwe-0002jH-2v for 72004@debbugs.gnu.org; Thu, 11 Jul 2024 03:10:26 -0400 Original-Received: from filter006.mxroute.com ([136.175.111.3] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta116.mxroute.com (ZoneMTA) with ESMTPSA id 190a0a0f5e200017a3.001 for <72004@debbugs.gnu.org> (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Thu, 11 Jul 2024 07:10:21 +0000 X-Zone-Loop: fb41804fc47102e346e569ea510dd86d90a34e8c7f3a X-Originating-IP: [136.175.111.3] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=neverwas.me ; s=x; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=A6ljMf2x2nNrKp5iv/0sflhUBz5XluaVltP1eHHk060=; b=J1k+/x/bjTYbyYqkapZbcwkGg1 RL1U5V7WjIe2JRm2xBGnkd/RfIPCcb7DO8UZ2MrgQTxZxyrV7Wnz8Qj5rk8pZ1gcagmlvy2BGYeeW yLCgVCIGasMjh3Vc9onsvNlDJu6/JiToIpOLzgwr/G+kk5BzfQ4WF9tdSTXHh9pD+NtG8aYIWWy4f 3Cz33LyHqDCOUPw2teMZngLb0pVXOCus4LlBqLHhzxexuezfssFE+mzzIdL/qLxPnDCgNTYweg7cm VxZo0Nt8w4KBuZPmXWVQmPVISAWF+WYGHk2XiKaprsWsX/z4+U9JimC2e8pAQqbpkkRrTjk6cZo3s FMmjSsxw==; In-Reply-To: <86o776ztb9.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 09 Jul 2024 14:41:14 +0300") X-Authenticated-Id: masked@neverwas.me X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:288718 Archived-At: Hi Andrea, Eli Zaretskii writes: >> From: Andrea Corallo >> Date: Tue, 09 Jul 2024 04:08:06 -0400 >> >> Since few days I see 'erc--check-prompt-input-for-multiline-blanks' >> failing. I think the fail is intermittent and because of that I could >> not determine the commit that introduced it. >> >> I observe this both on emacs-30 both on master, the first commit in >> emacs-30 where I observed it is 2fb6a98ecfa1579273a640e923f2e52f75e1f7ad >> which seems unrelated (but I mention it so we have a point in time). I've not yet witnessed the test in question fail, but I can definitely imagine it doing so because it's rather flimsy, which is my bad. I've therefore attempted a superficial fix on the release branch: ef3f26ec02d ; Tag ERC multiline blanks test as :expensive Here's what (I think) is going on. That test relies on the macro `ert-with-message-capture'. Because that macro advises a few primitive functions, its first appearance in any make-check run exhibits a trampoline penalty in terms of execution time (as I'm sure you, more than anyone, are acutely aware). For example, if you put this at the bottom of test/lisp/emacs-lisp/ert-x-tests.el (ert-deftest ert-with-message-capture/1 () (ert-with-message-capture string (ignore string))) (ert-deftest ert-with-message-capture/2 () (ert-with-message-capture string (ignore string))) you'll notice the first takes upwards of a few seconds (when built with debugging symbols), while subsequent occurrences are comparatively free: passed 21/30 ert-with-message-capture/1 (3.067526 sec) passed 22/30 ert-with-message-capture/2 (0.000396 sec) I think it's possible that this phenomenon, combined with added CPU pressure from unbounded "make -j" runs, may account for the intermittent failures you've been seeing. And correct me if I'm wrong, but I'm guessing that during parallel make-check runs, the first occurrence of `ert-with-message-capture' in any one file always incurs such a penalty because `ert-run-tests-batch-and-exit' deletes its .eln cache on exit and "make -j" runs every test file in a separate process. (Incidentally, I count eleven files in the suite currently using this macro. Granted, none likely depends on a brittle hard timeout, like the "sleep 10" in my test, so there's surely no risk of similar failures, but if the mere appearance of that macro or ones like it translates to noticeable overhead, perhaps it's worth looking into eventually.) Anyway, thanks for bringing this to ERC's attention. J.P.