Subject: bug#76188: erc-nicks-track-faces/prioritize failure on Fedora

From: Paul Eggert <[email-masked]>
Date: Mon, 10 Feb 2025 15:01:18 -0800

On Fedora 41 with the current master (commit 
4936a8d5acbfee2dee6d903400eba48cb2e3a6a7) I saw a failure with 
erc-nicks-track-faces/prioritize, as follows, when running "make -j5". I 
could not reproduce the problem when running just this test, so perhaps 
there's some conflict with some other test being run at about the same 
time. This is a machine with a slow CPU (AMD Phenom II X4 910e) so it's 
painful to run all the tests.

>   GEN      lisp/erc/erc-button-tests.log
>   GEN      lisp/erc/erc-dcc-tests.log
>   GEN      lisp/erc/erc-fill-tests.log
>   GEN      lisp/erc/erc-goodies-tests.log
>   GEN      lisp/erc/erc-join-tests.log
>   GEN      lisp/erc/erc-match-tests.log
>   GEN      lisp/erc/erc-networks-tests.log
>   GEN      lisp/erc/erc-nicks-tests.log
>   GEN      lisp/erc/erc-notify-tests.log
>   GEN      lisp/erc/erc-sasl-tests.log
>   GEN      lisp/erc/erc-scenarios-auth-source.log
> Running 20 tests (2025-02-10 14:39:24-0800, selector `(not (or (tag :expensive-test) (tag :unstable)))')
>    passed   1/20  erc-nicks--create-coerced-pool (0.003332 sec)
>    passed   2/20  erc-nicks--create-culled-pool (0.000270 sec)
>    passed   3/20  erc-nicks--gen-key-from-format-spec (0.000148 sec)
>    passed   4/20  erc-nicks--get-contrast (0.000198 sec)
>    passed   5/20  erc-nicks--get-luminance (0.000110 sec)
>    passed   6/20  erc-nicks--invert-classic--dark (0.000274 sec)
>    passed   7/20  erc-nicks--invert-classic--light (0.000202 sec)
>    passed   8/20  erc-nicks--skip-p (0.000170 sec)
>    passed   9/20  erc-nicks--trim (0.000149 sec)
>    passed  10/20  erc-nicks-add-contrast (0.000346 sec)
>    passed  11/20  erc-nicks-cap-contrast (0.003284 sec)
>    passed  12/20  erc-nicks-customize-face (0.089120 sec)
>    passed  13/20  erc-nicks-invert--classic (0.000188 sec)
>    passed  14/20  erc-nicks-invert--dark (0.000253 sec)
>    passed  15/20  erc-nicks-invert--light (0.000531 sec)
>    passed  16/20  erc-nicks-list-faces (0.021769 sec)
>    passed  17/20  erc-nicks-track-faces/defer (0.447407 sec)
>    passed  18/20  erc-nicks-track-faces/nil (0.003170 sec)
> Test erc-nicks-track-faces/prioritize backtrace:
>   signal(ert-test-failed (((should (equal (alist-get (current-buffer) 
>   ert-fail(((should (equal (alist-get (current-buffer) erc-modified-ch
>   #f(compiled-function (result) #<bytecode 0x3f881f1997fceb3>)((5 erc-
>   #f(compiled-function (set-faces assert-result add-face bob-face alic
>   #f(compiled-function (set-faces) #<bytecode -0x1f0bb68c95354bfe>)(#f
>   funcall(#f(compiled-function (set-faces) #<bytecode -0x1f0bb68c95354
>   (progn (fset 'erc-track--collect-faces-in vnew) (erc-track--setup) (
>   (unwind-protect (progn (fset 'erc-track--collect-faces-in vnew) (erc
>   (let* ((vnew #'(lambda nil (cons (map-into (mapcar ... faces) '...) 
>   (progn (fset 'erc-faces-in vnew) (let* ((vnew #'(lambda nil (cons (m
>   (unwind-protect (progn (fset 'erc-faces-in vnew) (let* ((vnew #'(lam
>   (let* ((vnew #'(lambda (_) faces)) (old (symbol-function 'erc-faces-
>   (progn (fset 'force-mode-line-update #'ignore) (let* ((vnew #'(lambd
>   (unwind-protect (progn (fset 'force-mode-line-update #'ignore) (let*
>   (let* ((old (symbol-function 'force-mode-line-update))) (unwind-prot
>   (let ((faces nil)) (let* ((old (symbol-function 'force-mode-line-upd
>   (let ((erc-modified-channels-object erc-modified-channels-object)) (
>   (let ((erc-modified-channels-alist nil)) (let ((erc-modified-channel
>   (let ((erc-track-mode t)) (let ((erc-modified-channels-alist nil)) (
>   erc-tests-common-track-modified-channels-sans-setup(#f(compiled-func
>   erc-nicks-tests--track-faces(#f(compiled-function (set-faces assert-
>   #f(compiled-function () #<bytecode 0x1703bb0cb2480b8d>)()
>   #f(compiled-function () #<bytecode 0x1c3b3af23a7c8eb0>)()
>   handler-bind-1(#f(compiled-function () #<bytecode 0x1c3b3af23a7c8eb0
>   ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
>   ert-run-test(#s(ert-test :name erc-nicks-track-faces/prioritize :doc
>   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 erc-nicks-track-faces/prioritize condition:
>     (ert-test-failed
>      ((should (equal (alist-get ... erc-modified-channels-alist) result))
>       :form
>       (equal (5 . erc-default-face)
> 	     (5 erc-nicks-alice-face erc-default-face))
>       :value nil :explanation
>       (one-list-proper-one-improper (5 . erc-default-face)
> 				    (5 erc-nicks-alice-face
> 				       erc-default-face))))
>    FAILED  19/20  erc-nicks-track-faces/prioritize (0.034430 sec) at lisp/erc/erc-nicks-tests.el:617
>    passed  20/20  erc-nicks-track-faces/t (0.004072 sec)
> 
> Ran 20 tests, 19 results as expected, 1 unexpected (2025-02-10 14:39:25-0800, 0.802703 sec)
> 
> 1 unexpected results:
>    FAILED  erc-nicks-track-faces/prioritize
> 
> make[3]: *** [Makefile:184: lisp/erc/erc-nicks-tests.log] Error 1
>   GEN      lisp/erc/erc-scenarios-base-association-nick.log
>   GEN      lisp/erc/erc-scenarios-base-association-query.log
>   GEN      lisp/erc/erc-scenarios-base-association-samenet.log
>   GEN      lisp/erc/erc-scenarios-base-association.log
>   GEN      lisp/erc/erc-scenarios-base-attach.log
>   GEN      lisp/erc/erc-scenarios-base-auto-recon.log
>   GEN      lisp/erc/erc-scenarios-base-buffer-display.log
>   GEN      lisp/erc/erc-scenarios-base-chan-modes.log
>   GEN      lisp/erc/erc-scenarios-base-compat-rename-bouncer.log
>   GEN      lisp/erc/erc-scenarios-base-kill-on-part.log
>   GEN      lisp/erc/erc-scenarios-base-local-module-modes.log
>   ELC+ELN  lisp/erc/erc-scenarios-base-local-modules.elc
>   GEN      lisp/erc/erc-scenarios-base-misc-regressions.log
>   GEN      lisp/erc/erc-scenarios-base-netid-bouncer-id.log
>   GEN      lisp/erc/erc-scenarios-base-netid-bouncer-recon-base.log
>   GEN      lisp/erc/erc-scenarios-base-netid-bouncer-recon-both.log
>   GEN      lisp/erc/erc-scenarios-base-netid-bouncer-recon-id.log
>   GEN      lisp/erc/erc-scenarios-base-netid-bouncer.log
>   GEN      lisp/erc/erc-scenarios-base-netid-samenet.log
>   GEN      lisp/erc/erc-scenarios-base-query-participants.log
>   GEN      lisp/erc/erc-scenarios-base-reconnect.log
>   GEN      lisp/erc/erc-scenarios-base-renick.log
>   GEN      lisp/erc/erc-scenarios-base-reuse-buffers.log
>   GEN      lisp/erc/erc-scenarios-base-send-message.log
>   GEN      lisp/erc/erc-scenarios-base-split-line.log
>   GEN      lisp/erc/erc-scenarios-base-statusmsg.log
>   GEN      lisp/erc/erc-scenarios-base-unstable.log
>   GEN      lisp/erc/erc-scenarios-base-upstream-recon-soju.log
>   GEN      lisp/erc/erc-scenarios-base-upstream-recon-znc.log
>   GEN      lisp/erc/erc-scenarios-display-message.log
>   GEN      lisp/erc/erc-scenarios-fill-wrap.log
>   GEN      lisp/erc/erc-scenarios-ignore.log
>   GEN      lisp/erc/erc-scenarios-internal.log
>   GEN      lisp/erc/erc-scenarios-join-auth-source.log
>   GEN      lisp/erc/erc-scenarios-join-display-context.log
>   GEN      lisp/erc/erc-scenarios-join-netid-newcmd-id.log
>   GEN      lisp/erc/erc-scenarios-join-netid-newcmd.log
>   GEN      lisp/erc/erc-scenarios-join-netid-recon-id.log
>   GEN      lisp/erc/erc-scenarios-join-netid-recon.log
>   GEN      lisp/erc/erc-scenarios-keep-place-indicator-trunc.log
>   GEN      lisp/erc/erc-scenarios-keep-place-indicator.log
>   GEN      lisp/erc/erc-scenarios-log.log
>   GEN      lisp/erc/erc-scenarios-match.log
>   GEN      lisp/erc/erc-scenarios-misc-commands.log
>   GEN      lisp/erc/erc-scenarios-misc.log
>   GEN      lisp/erc/erc-scenarios-prompt-format.log
>   GEN      lisp/erc/erc-scenarios-sasl.log
>   GEN      lisp/erc/erc-scenarios-scrolltobottom-relaxed.log
>   GEN      lisp/erc/erc-scenarios-scrolltobottom.log
>   GEN      lisp/erc/erc-scenarios-services-misc.log
>   GEN      lisp/erc/erc-scenarios-spelling.log
>   GEN      lisp/erc/erc-scenarios-stamp.log
>   GEN      lisp/erc/erc-scenarios-status-sidebar.log
>   GEN      lisp/erc/erc-services-tests.log
>   GEN      lisp/erc/erc-stamp-tests.log
>   ELC+ELN  lisp/erc/erc-tests.elc
>   GEN      lisp/erc/erc-track-tests.log