Subject: bug#65615: 30.0.50; auto-revert-test05-global-notify test fails intermittently

From: Stefan Kangas <[email-masked]>
Date: Wed, 30 Aug 2023 10:39:53 +0200

X-Debbugs-CC: [email-masked]

The test auto-revert-test05-global-notify fails intermittently, seen
on macOS.  I believe this happens relatively rarely, and it happened
while my old machine was under heavy load. I see that a similar issue
was fixed for EMBA in commit 4de46e6872d3.

Running 7 tests (2023-08-30 09:28:20+0200, selector ‘(not (or (tag
:expensive-test) (tag :unstable) (tag :nativecomp)))’)
Reverting buffer ‘emacs-test-EXuKkj-autorevert’
   passed  1/7  auto-revert-test00-auto-revert-mode (2.782896 sec)
(Shell command succeeded with no output)
Reverting buffer ‘auto-revert-test0NMtMd-autorevert’
Reverting buffer ‘auto-revert-testtwGsjv-autorevert’
   passed  2/7  auto-revert-test01-auto-revert-several-files (0.734353 sec)
Reverting buffer ‘emacs-test-0imLbK-autorevert’
   passed  3/7  auto-revert-test03-auto-revert-tail-mode (0.317578 sec)
ls does not support --dired -N; see ‘dired-use-ls-dired’ for more details.
Reverting buffer ‘T’
Reverting buffer ‘T’
Reverting buffer ‘T’
   passed  4/7  auto-revert-test04-auto-revert-mode-dired (3.165945 sec)
Reverting buffer ‘emacs-test-12UQz7-autorevert’
Reverting buffer ‘emacs-test-mLBmbZ-autorevert’
Test auto-revert-test05-global-notify backtrace:
  signal(ert-test-failed (((should (buffer-local-value 'auto-revert-no
  ert-fail(((should (buffer-local-value 'auto-revert-notify-watch-desc
  #f(compiled-function () #<bytecode -0x15ca28c8f9e277c5>)()
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name auto-revert-test05-global-notify :doc
  ert-run-or-rerun-test(#s(ert--stats :selector (not (or ... ... ...))
  ert-run-tests((not (or (tag :expensive-test) (tag :unstable) (tag :n
  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" "-l" "lisp/autorevert-tests" "-
  command-line()
  normal-top-level()
Test auto-revert-test05-global-notify condition:
    (ert-test-failed
     ((should
       (buffer-local-value 'auto-revert-notify-watch-descriptor buf-3))
      :form
      (buffer-local-value auto-revert-notify-watch-descriptor #<killed
              buffer>)
      :value nil))
   FAILED  5/7  auto-revert-test05-global-notify (1.003363 sec) at
lisp/autorevert-tests.el:451
Reverting buffer ‘emacs-test-zTHbm7-autorevert-2’
   passed  6/7  auto-revert-test06-write-file (0.439048 sec)
Reverting buffer ‘emacs-test-XVNcU4-autorevert’
Reverting buffer ‘emacs-test-XVNcU4-autorevert-9’
Reverting buffer ‘emacs-test-XVNcU4-autorevert-8’
Reverting buffer ‘emacs-test-XVNcU4-autorevert-7’
Reverting buffer ‘emacs-test-XVNcU4-autorevert-6’
Reverting buffer ‘emacs-test-XVNcU4-autorevert-5’
Reverting buffer ‘emacs-test-XVNcU4-autorevert-4’
Reverting buffer ‘emacs-test-XVNcU4-autorevert-3’
Reverting buffer ‘emacs-test-XVNcU4-autorevert-2’
Reverting buffer ‘emacs-test-XVNcU4-autorevert-1’
Reverting buffer ‘emacs-test-XVNcU4-autorevert-0’
   passed  7/7  auto-revert-test07-auto-revert-several-buffers (0.700587 sec)

Ran 7 tests, 6 results as expected, 1 unexpected (2023-08-30
09:28:32+0200, 12.705619 sec)

1 unexpected results:
   FAILED  auto-revert-test05-global-notify

make[3]: *** [lisp/autorevert-tests.log] Error 1

In GNU Emacs 30.0.50 (build 12, x86_64-apple-darwin21.6.0, NS
 appkit-2113.60 Version 12.6.8 (Build 21G725)) of 2023-08-30 built on
 MY-MacBook-Pro
Repository revision: 52e073b2ae63731277ab510066333a375c3c388d
Repository branch: master
Windowing system distributor 'Apple', version 10.3.2113
System Description:  macOS 12.6.8

Configured features:
ACL GIF GMP GNUTLS JPEG JSON LCMS2 LIBXML2 MODULES NOTIFY KQUEUE NS
PDUMPER PNG SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP
XIM ZLIB

Important settings:
  value of $LC_COLLATE: C
  value of $LC_CTYPE: sv_SE.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media puny dired
dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068
epg-config gnus-util text-property-search time-date subr-x mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils rmc iso-transl tooltip cconv eldoc paren electric
uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/ns-win ns-win ucs-normalize mule-util term/common-win touch-screen
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq
simple cl-generic indonesian philippine cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite emoji-zwj charscript charprop case-table
epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button
loaddefs theme-loaddefs faces cus-face macroexp files window
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget keymap hashtable-print-readable backquote threads kqueue
cocoa ns lcms2 multi-tty make-network-process emacs)

Memory information:
((conses 16 36144 9400) (symbols 48 5093 0) (strings 32 12631 1040)
 (string-bytes 1 352529) (vectors 16 9371)
 (vector-slots 8 147819 12258) (floats 8 21 23) (intervals 56 203 0)
 (buffers 992 10))