From: "J.P." <jp@neverwas.me>
To: Andrea Corallo <acorallo@gnu.org>
Cc: Eli Zaretskii <eliz@gnu.org>, emacs-erc@gnu.org, 72004@debbugs.gnu.org
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 [thread overview]
Message-ID: <87cynkv1yf.fsf__40257.1708242007$1720681897$gmane$org@neverwas.me> (raw)
In-Reply-To: <86o776ztb9.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 09 Jul 2024 14:41:14 +0300")
Hi Andrea,
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Andrea Corallo <acorallo@gnu.org>
>> 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.
next prev parent reply other threads:[~2024-07-11 7:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-09 8:08 bug#72004: 30.0.50, master: 'erc--check-prompt-input-for-multiline-blanks' test fail Andrea Corallo
2024-07-09 11:41 ` Eli Zaretskii
2024-07-11 7:10 ` J.P. [this message]
[not found] ` <87cynkv1yf.fsf@neverwas.me>
2024-07-11 8:24 ` Andrea Corallo
2024-07-11 18:26 ` J.P.
[not found] ` <87bk33ss3c.fsf@neverwas.me>
2024-07-12 7:30 ` Andrea Corallo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='87cynkv1yf.fsf__40257.1708242007$1720681897$gmane$org@neverwas.me' \
--to=jp@neverwas.me \
--cc=72004@debbugs.gnu.org \
--cc=acorallo@gnu.org \
--cc=eliz@gnu.org \
--cc=emacs-erc@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.