unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#73441: 31.0.50; Unstable proced-refine-test failure
@ 2024-09-23 13:19 Sam James
  2024-09-27 13:00 ` Laurence Warne
  0 siblings, 1 reply; 24+ messages in thread
From: Sam James @ 2024-09-23 13:19 UTC (permalink / raw)
  To: 73441; +Cc: Mattias Engdegård, Laurence Warne


[-- Attachment #1.1: Type: text/plain, Size: 1413 bytes --]


The 'proced-refine-test' test seems flaky to me, e.g.

"""
Test proced-refine-with-update-test condition:
    (ert-test-failed
     ((should (or pid-equal (when ... ... ...))) :form
      (or pid-equal
	  (if (string-match "PPID" proced-header-line) (progn ... ...)))
      :value nil))
   FAILED  4/7  proced-refine-with-update-test (0.215890 sec) at lisp/proced-tests.el:102
   passed  5/7  proced-revert-test (0.224430 sec)
   passed  6/7  proced-update-preserves-pid-at-point-test (0.251024 sec)
   passed  7/7  proced-update-test (0.234759 sec)

Ran 7 tests, 5 results as expected, 2 unexpected (2024-09-23 14:07:18+0100, 2.038374 sec)

2 unexpected results:
   FAILED  proced-refine-test  ((should (or pid-equal (when (string-match "PPID" proced-header-line) (proced--move-to-column "PPID") (string= pid (word-at-point))))) :form (or pid-equal (if (string-match "PPID" proced-header-line) (progn (proced--move-to-column "PPID") (string= pid (word-at-point))))) :value nil)
   FAILED  proced-refine-with-update-test  ((should (or pid-equal (when
   (string-match "PPID" proced-header-line) (proced--move-to-column
   "PPID") (string= pid (word-at-point))))) :form (or pid-equal (if
   (string-match "PPID" proced-header-line) (progn
   (proced--move-to-column "PPID") (string= pid (word-at-point)))))
   :value nil)
"""

On re-runs, sometimes just proced-refine-test fails. I've attached
proced-tests.log.


[-- Attachment #1.2: proced-tests.log --]
[-- Type: text/plain, Size: 21251 bytes --]

Running 7 tests (2024-09-23 14:07:16+0100, selector `(not (or (tag :expensive-test) (tag :unstable) (tag :nativecomp)))')
   passed  1/7  proced-color-test (0.188303 sec)
   passed  2/7  proced-format-test (0.621619 sec)
Test proced-refine-test backtrace:
  signal(ert-test-failed (((should (or pid-equal (when (string-match "PPID" proced-header-line) (proced--move-to-column "PPID") (string= pid (word-at-point))))) :form (or pid-equal (if (string-match "PPID" proced-header-line) (progn (proced--move-to-column "PPID") (string= pid (word-at-point))))) :value nil)))
  ert-fail(((should (or pid-equal (when (string-match "PPID" proced-header-line) (proced--move-to-column "PPID") (string= pid (word-at-point))))) :form (or pid-equal (if (string-match "PPID" proced-header-line) (progn (proced--move-to-column "PPID") (string= pid (word-at-point))))) :value nil))
  proced--assert-process-valid-pid-refinement(#("771" 0 3 (proced-pid 771 help-echo "mouse-2, RET: refine to process children" mouse-face highlight proced-key pid)))
  #f(compiled-function () #<bytecode 0x1b0977b456658904>)()
  #f(compiled-function () #<bytecode 0x1bc3e104d4c41fa6>)()
  handler-bind-1(#f(compiled-function () #<bytecode 0x1bc3e104d4c41fa6>) (error quit) #f(compiled-function (err) #<bytecode 0xd633da7534433e0>))
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test :name proced-refine-test :documentation nil :body #f(compiled-function () #<bytecode 0x1b0977b456658904>) :most-recent-result #s(ert-test-failed :messages "Updating process information...done.\nUpdating process information...done.\nType q to quit, ? for help\nUpdating process display...done.\n" :should-forms (... ...) :duration 0.197100918 :condition (ert-test-failed ...) :backtrace (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :infos nil) :expected-result-type :passed :tags nil :file-name "/var/tmp/portage/app-editors/emacs-31.0.9999/work/emacs/test/lisp/proced-tests.el") :result #s(ert-test-failed :messages "Updating process information...done.\nUpdating process information...done.\nType q to quit, ? for help\nUpdating process display...done.\n" :should-forms ((... :form ... :value t) (... :form ... :value nil)) :duration 0.197100918 :condition (ert-test-failed (... :form ... :value nil)) :backtrace (#s(backtrace-frame :evald t :fun signal :args ... :flags nil :locals nil :buffer nil :pos nil) #s(backtrace-frame :evald t :fun ert-fail :args ... :flags nil :locals nil :buffer nil :pos nil) #s(backtrace-frame :evald t :fun proced--assert-process-valid-pid-refinement :args ... :flags nil :locals nil :buffer nil :pos nil) #s(backtrace-frame :evald t :fun #f(compiled-function () #<bytecode 0x1b0977b456658904>) :args nil :flags nil :locals ... :buffer nil :pos nil) #s(backtrace-frame :evald t :fun #f(compiled-function () #<bytecode 0x1bc3e104d4c41fa6>) :args nil :flags nil :locals nil :buffer nil :pos nil) #s(backtrace-frame :evald t :fun handler-bind-1 :args ... :flags nil :locals nil :buffer nil :pos nil) #s(backtrace-frame :evald t :fun ert--run-test-internal :args #0 :flags nil :locals ... :buffer nil :pos nil) #s(backtrace-frame :evald t :fun ert-run-test :args ... :flags nil :locals ... :buffer nil :pos nil) #s(backtrace-frame :evald t :fun ert-run-or-rerun-test :args ... :flags nil :locals ... :buffer nil :pos nil) #s(backtrace-frame :evald t :fun ert-run-tests :args ... :flags nil :locals ... :buffer nil :pos nil) #s(backtrace-frame :evald t :fun ert-run-tests-batch :args ... :flags nil :locals nil :buffer nil :pos nil) #s(backtrace-frame :evald t :fun ert-run-tests-batch-and-exit :args ... :flags nil :locals nil :buffer nil :pos nil) #s(backtrace-frame :evald t :fun eval :args ... :flags nil :locals nil :buffer nil :pos nil) #s(backtrace-frame :evald t :fun command-line-1 :args ... :flags nil :locals ... :buffer nil :pos nil) #s(backtrace-frame :evald t :fun command-line :args nil :flags nil :locals nil :buffer nil :pos nil) #s(backtrace-frame :evald t :fun normal-top-level :args nil :flags nil :locals nil :buffer nil :pos nil)) :infos nil) :exit-continuation #f(compiled-function () #<bytecode 0x8e70fb216560c3>) :ert-debug-on-error nil))
  ert-run-test(#s(ert-test :name proced-refine-test :documentation nil :body #f(compiled-function () #<bytecode 0x1b0977b456658904>) :most-recent-result #s(ert-test-failed :messages "Updating process information...done.\nUpdating process information...done.\nType q to quit, ? for help\nUpdating process display...done.\n" :should-forms (((should (or pid-equal ...)) :form (or pid-equal (if ... ...)) :value t) ((should (or pid-equal ...)) :form (or pid-equal (if ... ...)) :value nil)) :duration 0.197100918 :condition (ert-test-failed ((should (or pid-equal ...)) :form (or pid-equal (if ... ...)) :value nil)) :backtrace (#s(backtrace-frame :evald t :fun signal :args (ert-test-failed (...)) :flags nil :locals nil :buffer nil :pos nil) #s(backtrace-frame :evald t :fun ert-fail :args ((... :form ... :value nil)) :flags nil :locals nil :buffer nil :pos nil) #s(backtrace-frame :evald t :fun proced--assert-process-valid-pid-refinement :args (#("771" 0 3 ...)) :flags nil :locals nil :buffer nil :pos nil) #s(backtrace-frame :evald t :fun #f(compiled-function () #<bytecode 0x1b0977b456658904>) :args nil :flags nil :locals ((inhibit-message . t) (proced-auto-update-flag) (proced-filter . user) (proced-format . verbose)) :buffer nil :pos nil) #s(backtrace-frame :evald t :fun #f(compiled-function () #<bytecode 0x1bc3e104d4c41fa6>) :args nil :flags nil :locals nil :buffer nil :pos nil) #s(backtrace-frame :evald t :fun handler-bind-1 :args (#f(compiled-function () #<bytecode 0x1bc3e104d4c41fa6>) (error quit) #f(compiled-function (err) #<bytecode 0xd633da7534433e0>)) :flags nil :locals nil :buffer nil :pos nil) #s(backtrace-frame :evald t :fun ert--run-test-internal :args (#s(ert--test-execution-info :test #1 :result #2 :exit-continuation #f(compiled-function () #<bytecode 0x8e70fb216560c3>) :ert-debug-on-error nil)) :flags nil :locals ((ert--infos) (lexical-binding . t)) :buffer nil :pos nil) #s(backtrace-frame :evald t :fun ert-run-test :args #0 :flags nil :locals ((ert--running-tests #1) (message-log-max . t) (ert--should-execution-observer . #f(compiled-function (form-description) #<bytecode 0xa54c6baa48ea12e>))) :buffer nil :pos nil) #s(backtrace-frame :evald t :fun ert-run-or-rerun-test :args (#s(ert--stats :selector ... :tests ... :test-map #<hash-table eql 7/7 0x10e7ce83b273 ...> :test-results ... :test-start-times ... :test-end-times ... :passed-expected 2 :passed-unexpected 0 :failed-expected 0 :failed-unexpected 1 :skipped 0 :start-time ... :end-time nil :aborted-p nil :current-test #1 :next-redisplay 0.0) #1 #f(compiled-function (event-type &rest event-args) #<bytecode 0xb857ff9f4b4d21d>)) :flags nil :locals ((ert--current-run-stats . ...)) :buffer nil :pos nil) #s(backtrace-frame :evald t :fun ert-run-tests :args ((not ...) #f(compiled-function (event-type &rest event-args) #<bytecode 0xb857ff9f4b4d21d>) nil) :flags nil :locals ((ert--current-run-stats . ...)) :buffer nil :pos nil) #s(backtrace-frame :evald t :fun ert-run-tests-batch :args ((not ...)) :flags nil :locals nil :buffer nil :pos nil) #s(backtrace-frame :evald t :fun ert-run-tests-batch-and-exit :args ((not ...)) :flags nil :locals nil :buffer nil :pos nil) #s(backtrace-frame :evald t :fun eval :args ((ert-run-tests-batch-and-exit ...) t) :flags nil :locals nil :buffer nil :pos nil) #s(backtrace-frame :evald t :fun command-line-1 :args (("-L" ":." "-l" "ert" "--eval" "(setq treesit-extra-load-path '(\"/var/tmp/portage/app-editors/emacs-31.0.9999/homedir/.emacs.d/tree-sitter\"))" "--eval" "(setq ert-batch-backtrace-right-margin nil)" "-l" "lisp/proced-tests" "--eval" "(ert-run-tests-batch-and-exit (quote (not (or (tag :expensive-test) (tag :unstable) (tag :nativecomp)))))")) :flags nil :locals ((command-line-args-left) (argi . "-eval")) :buffer nil :pos nil) #s(backtrace-frame :evald t :fun command-line :args nil :flags nil :locals nil :buffer nil :pos nil) #s(backtrace-frame :evald t :fun normal-top-level :args nil :flags nil :locals nil :buffer nil :pos nil)) :infos nil) :expected-result-type :passed :tags nil :file-name "/var/tmp/portage/app-editors/emacs-31.0.9999/work/emacs/test/lisp/proced-tests.el"))
  ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-map #<hash-table eql 7/7 0x10e7ce83b273 ...> :test-results ... :test-start-times ... :test-end-times ... :passed-expected 2 :passed-unexpected 0 :failed-expected 0 :failed-unexpected 1 :skipped 0 :start-time ... :end-time nil :aborted-p nil ...) #s(ert-test :name proced-refine-test :documentation nil :body #f(compiled-function () #<bytecode 0x1b0977b456658904>) :most-recent-result ... :expected-result-type :passed :tags nil :file-name "/var/tmp/portage/app-editors/emacs-31.0.9999/work/emacs/test/lisp/proced-tests.el") #f(compiled-function (event-type &rest event-args) #<bytecode 0xb857ff9f4b4d21d>))
  ert-run-tests((not (or (tag :expensive-test) (tag :unstable) (tag :nativecomp))) #f(compiled-function (event-type &rest event-args) #<bytecode 0xb857ff9f4b4d21d>) nil)
  ert-run-tests-batch((not (or (tag :expensive-test) (tag :unstable) (tag :nativecomp))))
  ert-run-tests-batch-and-exit((not (or (tag :expensive-test) (tag :unstable) (tag :nativecomp))))
  eval((ert-run-tests-batch-and-exit '(not (or (tag :expensive-test) (tag :unstable) (tag :nativecomp)))) t)
  command-line-1(("-L" ":." "-l" "ert" "--eval" "(setq treesit-extra-load-path '(\"/var/tmp/portage/app-editors/emacs-31.0.9999/homedir/.emacs.d/tree-sitter\"))" "--eval" "(setq ert-batch-backtrace-right-margin nil)" "-l" "lisp/proced-tests" "--eval" "(ert-run-tests-batch-and-exit (quote (not (or (tag :expensive-test) (tag :unstable) (tag :nativecomp)))))"))
  command-line()
  normal-top-level()

Test proced-refine-test condition:
    (ert-test-failed
     ((should (or pid-equal (when ... ... ...))) :form
      (or pid-equal
	  (if (string-match "PPID" proced-header-line) (progn ... ...)))
      :value nil))
   FAILED  3/7  proced-refine-test (0.197101 sec) at lisp/proced-tests.el:87
Test proced-refine-with-update-test backtrace:
  signal(ert-test-failed (((should (or pid-equal (when (string-match "PPID" proced-header-line) (proced--move-to-column "PPID") (string= pid (word-at-point))))) :form (or pid-equal (if (string-match "PPID" proced-header-line) (progn (proced--move-to-column "PPID") (string= pid (word-at-point))))) :value nil)))
  ert-fail(((should (or pid-equal (when (string-match "PPID" proced-header-line) (proced--move-to-column "PPID") (string= pid (word-at-point))))) :form (or pid-equal (if (string-match "PPID" proced-header-line) (progn (proced--move-to-column "PPID") (string= pid (word-at-point))))) :value nil))
  proced--assert-process-valid-pid-refinement(#("771" 0 3 (proced-pid 771 help-echo "mouse-2, RET: refine to process children" mouse-face highlight proced-key pid)))
  #f(compiled-function () #<bytecode 0x1e50e4b978c40685>)()
  #f(compiled-function () #<bytecode 0x1bc3e104d4c41fa6>)()
  handler-bind-1(#f(compiled-function () #<bytecode 0x1bc3e104d4c41fa6>) (error quit) #f(compiled-function (err) #<bytecode 0xd633da7534433e0>))
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test :name proced-refine-with-update-test :documentation nil :body #f(compiled-function () #<bytecode 0x1e50e4b978c40685>) :most-recent-result #s(ert-test-failed :messages "Updating process information...done.\nUpdating process information...done.\nType q to quit, ? for help\nUpdating process display...done.\nUpdating process display...done.\n" :should-forms (... ...) :duration 0.215890419 :condition (ert-test-failed ...) :backtrace (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :infos nil) :expected-result-type :passed :tags nil :file-name "/var/tmp/portage/app-editors/emacs-31.0.9999/work/emacs/test/lisp/proced-tests.el") :result #s(ert-test-failed :messages "Updating process information...done.\nUpdating process information...done.\nType q to quit, ? for help\nUpdating process display...done.\nUpdating process display...done.\n" :should-forms ((... :form ... :value t) (... :form ... :value nil)) :duration 0.215890419 :condition (ert-test-failed (... :form ... :value nil)) :backtrace (#s(backtrace-frame :evald t :fun signal :args ... :flags nil :locals nil :buffer nil :pos nil) #s(backtrace-frame :evald t :fun ert-fail :args ... :flags nil :locals nil :buffer nil :pos nil) #s(backtrace-frame :evald t :fun proced--assert-process-valid-pid-refinement :args ... :flags nil :locals nil :buffer nil :pos nil) #s(backtrace-frame :evald t :fun #f(compiled-function () #<bytecode 0x1e50e4b978c40685>) :args nil :flags nil :locals ... :buffer nil :pos nil) #s(backtrace-frame :evald t :fun #f(compiled-function () #<bytecode 0x1bc3e104d4c41fa6>) :args nil :flags nil :locals nil :buffer nil :pos nil) #s(backtrace-frame :evald t :fun handler-bind-1 :args ... :flags nil :locals nil :buffer nil :pos nil) #s(backtrace-frame :evald t :fun ert--run-test-internal :args #0 :flags nil :locals ... :buffer nil :pos nil) #s(backtrace-frame :evald t :fun ert-run-test :args ... :flags nil :locals ... :buffer nil :pos nil) #s(backtrace-frame :evald t :fun ert-run-or-rerun-test :args ... :flags nil :locals ... :buffer nil :pos nil) #s(backtrace-frame :evald t :fun ert-run-tests :args ... :flags nil :locals ... :buffer nil :pos nil) #s(backtrace-frame :evald t :fun ert-run-tests-batch :args ... :flags nil :locals nil :buffer nil :pos nil) #s(backtrace-frame :evald t :fun ert-run-tests-batch-and-exit :args ... :flags nil :locals nil :buffer nil :pos nil) #s(backtrace-frame :evald t :fun eval :args ... :flags nil :locals nil :buffer nil :pos nil) #s(backtrace-frame :evald t :fun command-line-1 :args ... :flags nil :locals ... :buffer nil :pos nil) #s(backtrace-frame :evald t :fun command-line :args nil :flags nil :locals nil :buffer nil :pos nil) #s(backtrace-frame :evald t :fun normal-top-level :args nil :flags nil :locals nil :buffer nil :pos nil)) :infos nil) :exit-continuation #f(compiled-function () #<bytecode 0x8e70fb216560c3>) :ert-debug-on-error nil))
  ert-run-test(#s(ert-test :name proced-refine-with-update-test :documentation nil :body #f(compiled-function () #<bytecode 0x1e50e4b978c40685>) :most-recent-result #s(ert-test-failed :messages "Updating process information...done.\nUpdating process information...done.\nType q to quit, ? for help\nUpdating process display...done.\nUpdating process display...done.\n" :should-forms (((should (or pid-equal ...)) :form (or pid-equal (if ... ...)) :value t) ((should (or pid-equal ...)) :form (or pid-equal (if ... ...)) :value nil)) :duration 0.215890419 :condition (ert-test-failed ((should (or pid-equal ...)) :form (or pid-equal (if ... ...)) :value nil)) :backtrace (#s(backtrace-frame :evald t :fun signal :args (ert-test-failed (...)) :flags nil :locals nil :buffer nil :pos nil) #s(backtrace-frame :evald t :fun ert-fail :args ((... :form ... :value nil)) :flags nil :locals nil :buffer nil :pos nil) #s(backtrace-frame :evald t :fun proced--assert-process-valid-pid-refinement :args (#("771" 0 3 ...)) :flags nil :locals nil :buffer nil :pos nil) #s(backtrace-frame :evald t :fun #f(compiled-function () #<bytecode 0x1e50e4b978c40685>) :args nil :flags nil :locals ((inhibit-message . t) (proced-auto-update-flag) (proced-filter . user) (proced-format . verbose)) :buffer nil :pos nil) #s(backtrace-frame :evald t :fun #f(compiled-function () #<bytecode 0x1bc3e104d4c41fa6>) :args nil :flags nil :locals nil :buffer nil :pos nil) #s(backtrace-frame :evald t :fun handler-bind-1 :args (#f(compiled-function () #<bytecode 0x1bc3e104d4c41fa6>) (error quit) #f(compiled-function (err) #<bytecode 0xd633da7534433e0>)) :flags nil :locals nil :buffer nil :pos nil) #s(backtrace-frame :evald t :fun ert--run-test-internal :args (#s(ert--test-execution-info :test #1 :result #2 :exit-continuation #f(compiled-function () #<bytecode 0x8e70fb216560c3>) :ert-debug-on-error nil)) :flags nil :locals ((ert--infos) (lexical-binding . t)) :buffer nil :pos nil) #s(backtrace-frame :evald t :fun ert-run-test :args #0 :flags nil :locals ((ert--running-tests #1) (message-log-max . t) (ert--should-execution-observer . #f(compiled-function (form-description) #<bytecode 0xa54c6baa48ea12e>))) :buffer nil :pos nil) #s(backtrace-frame :evald t :fun ert-run-or-rerun-test :args (#s(ert--stats :selector ... :tests ... :test-map #<hash-table eql 7/7 0x10e7ce83b273 ...> :test-results ... :test-start-times ... :test-end-times ... :passed-expected 2 :passed-unexpected 0 :failed-expected 0 :failed-unexpected 2 :skipped 0 :start-time ... :end-time nil :aborted-p nil :current-test #1 :next-redisplay 0.0) #1 #f(compiled-function (event-type &rest event-args) #<bytecode 0xb857ff9f4b4d21d>)) :flags nil :locals ((ert--current-run-stats . ...)) :buffer nil :pos nil) #s(backtrace-frame :evald t :fun ert-run-tests :args ((not ...) #f(compiled-function (event-type &rest event-args) #<bytecode 0xb857ff9f4b4d21d>) nil) :flags nil :locals ((ert--current-run-stats . ...)) :buffer nil :pos nil) #s(backtrace-frame :evald t :fun ert-run-tests-batch :args ((not ...)) :flags nil :locals nil :buffer nil :pos nil) #s(backtrace-frame :evald t :fun ert-run-tests-batch-and-exit :args ((not ...)) :flags nil :locals nil :buffer nil :pos nil) #s(backtrace-frame :evald t :fun eval :args ((ert-run-tests-batch-and-exit ...) t) :flags nil :locals nil :buffer nil :pos nil) #s(backtrace-frame :evald t :fun command-line-1 :args (("-L" ":." "-l" "ert" "--eval" "(setq treesit-extra-load-path '(\"/var/tmp/portage/app-editors/emacs-31.0.9999/homedir/.emacs.d/tree-sitter\"))" "--eval" "(setq ert-batch-backtrace-right-margin nil)" "-l" "lisp/proced-tests" "--eval" "(ert-run-tests-batch-and-exit (quote (not (or (tag :expensive-test) (tag :unstable) (tag :nativecomp)))))")) :flags nil :locals ((command-line-args-left) (argi . "-eval")) :buffer nil :pos nil) #s(backtrace-frame :evald t :fun command-line :args nil :flags nil :locals nil :buffer nil :pos nil) #s(backtrace-frame :evald t :fun normal-top-level :args nil :flags nil :locals nil :buffer nil :pos nil)) :infos nil) :expected-result-type :passed :tags nil :file-name "/var/tmp/portage/app-editors/emacs-31.0.9999/work/emacs/test/lisp/proced-tests.el"))
  ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-map #<hash-table eql 7/7 0x10e7ce83b273 ...> :test-results ... :test-start-times ... :test-end-times ... :passed-expected 2 :passed-unexpected 0 :failed-expected 0 :failed-unexpected 2 :skipped 0 :start-time ... :end-time nil :aborted-p nil ...) #s(ert-test :name proced-refine-with-update-test :documentation nil :body #f(compiled-function () #<bytecode 0x1e50e4b978c40685>) :most-recent-result ... :expected-result-type :passed :tags nil :file-name "/var/tmp/portage/app-editors/emacs-31.0.9999/work/emacs/test/lisp/proced-tests.el") #f(compiled-function (event-type &rest event-args) #<bytecode 0xb857ff9f4b4d21d>))
  ert-run-tests((not (or (tag :expensive-test) (tag :unstable) (tag :nativecomp))) #f(compiled-function (event-type &rest event-args) #<bytecode 0xb857ff9f4b4d21d>) nil)
  ert-run-tests-batch((not (or (tag :expensive-test) (tag :unstable) (tag :nativecomp))))
  ert-run-tests-batch-and-exit((not (or (tag :expensive-test) (tag :unstable) (tag :nativecomp))))
  eval((ert-run-tests-batch-and-exit '(not (or (tag :expensive-test) (tag :unstable) (tag :nativecomp)))) t)
  command-line-1(("-L" ":." "-l" "ert" "--eval" "(setq treesit-extra-load-path '(\"/var/tmp/portage/app-editors/emacs-31.0.9999/homedir/.emacs.d/tree-sitter\"))" "--eval" "(setq ert-batch-backtrace-right-margin nil)" "-l" "lisp/proced-tests" "--eval" "(ert-run-tests-batch-and-exit (quote (not (or (tag :expensive-test) (tag :unstable) (tag :nativecomp)))))"))
  command-line()
  normal-top-level()

Test proced-refine-with-update-test condition:
    (ert-test-failed
     ((should (or pid-equal (when ... ... ...))) :form
      (or pid-equal
	  (if (string-match "PPID" proced-header-line) (progn ... ...)))
      :value nil))
   FAILED  4/7  proced-refine-with-update-test (0.215890 sec) at lisp/proced-tests.el:102
   passed  5/7  proced-revert-test (0.224430 sec)
   passed  6/7  proced-update-preserves-pid-at-point-test (0.251024 sec)
   passed  7/7  proced-update-test (0.234759 sec)

Ran 7 tests, 5 results as expected, 2 unexpected (2024-09-23 14:07:18+0100, 2.038374 sec)

2 unexpected results:
   FAILED  proced-refine-test  ((should (or pid-equal (when (string-match "PPID" proced-header-line) (proced--move-to-column "PPID") (string= pid (word-at-point))))) :form (or pid-equal (if (string-match "PPID" proced-header-line) (progn (proced--move-to-column "PPID") (string= pid (word-at-point))))) :value nil)
   FAILED  proced-refine-with-update-test  ((should (or pid-equal (when (string-match "PPID" proced-header-line) (proced--move-to-column "PPID") (string= pid (word-at-point))))) :form (or pid-equal (if (string-match "PPID" proced-header-line) (progn (proced--move-to-column "PPID") (string= pid (word-at-point))))) :value nil)

[-- Attachment #1.3: Type: text/plain, Size: 21267 bytes --]




In GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.42, cairo version 1.18.2) of 2024-09-22 built on localhost
Repository revision: e8f0baf354b117837fd686e2bf6ca8df15bd1cd4
Repository branch: master
System Description: Gentoo Linux

Configured using:
 'configure --prefix=/usr --build=x86_64-pc-linux-gnu
 --host=x86_64-pc-linux-gnu --mandir=/usr/share/man
 --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc
 --localstatedir=/var/lib --datarootdir=/usr/share
 --disable-silent-rules --docdir=/usr/share/doc/emacs-31.0.9999
 --htmldir=/usr/share/doc/emacs-31.0.9999/html --libdir=/usr/lib64
 --program-suffix=-emacs-31-vcs --includedir=/usr/include/emacs-31-vcs
 --infodir=/usr/share/info/emacs-31-vcs --localstatedir=/var
 --enable-locallisppath=/etc/emacs:/usr/share/emacs/site-lisp
 --without-compress-install --without-hesiod --without-pop
 --with-file-notification=inotify --with-pdumper --enable-acl
 --enable-xattr --with-dbus --with-modules --without-gameuser
 --with-libgmp --with-gpm --without-native-compilation
 --without-kerberos --without-kerberos5 --with-lcms2 --with-xml2
 --without-mailutils --without-selinux --with-sqlite3 --with-gnutls
 --with-libsystemd --with-threads --with-tree-sitter --without-wide-int
 --with-sound=alsa --with-zlib --with-pgtk --without-x --without-ns
 --with-toolkit-scroll-bars --without-gconf --with-gsettings
 --with-harfbuzz --without-libotf --without-m17n-flt --without-xwidgets
 --with-gif --with-jpeg --with-png --with-rsvg --with-tiff
 --without-webp --without-imagemagick --with-dumping=pdumper 'CFLAGS=-O3
 -march=native -mtls-dialect=gnu2 -flto=jobserver
 -fno-semantic-interposition -pipe -fcf-protection=none
 -fdiagnostics-color=always -fdiagnostics-urls=never
 -frecord-gcc-switches -Wa,-O2 -Wa,-mtune=znver2 -Wstrict-aliasing
 -Wfree-nonheap-object -Werror=lto-type-mismatch -Werror=strict-aliasing
 -Werror=odr -Wstrict-aliasing -Wfree-nonheap-object
 -Werror=lto-type-mismatch -Werror=strict-aliasing -Werror=odr
 -Wbuiltin-declaration-mismatch -ggdb3 -Wformat -Werror=format-security
 -fno-fast-math -ffp-contract=off' CPPFLAGS= 'LDFLAGS=-Wl,-O1
 -Wl,--as-needed -Wl,-z,pack-relative-relocs''

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
LCMS2 LIBSYSTEMD LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PGTK PNG RSVG
SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER XIM
GTK3 ZLIB

Important settings:
  value of $LANG: en_GB.utf8
  locale-coding-system: utf-8-unix

Major mode: mu4e:headers

Minor modes in effect:
  global-flycheck-mode: t
  global-company-mode: t
  company-mode: t
  erc-track-mode: t
  erc-ring-mode: t
  erc-notifications-mode: t
  erc-netsplit-mode: t
  erc-menu-mode: t
  erc-match-mode: t
  erc-list-mode: t
  erc-smiley-mode: t
  erc-irccontrols-mode: t
  erc-noncommands-mode: t
  erc-keep-place-mode: t
  erc-move-to-prompt-mode: t
  erc-readonly-mode: t
  erc-capab-identify-mode: t
  erc-button-mode: t
  erc-fill-mode: t
  erc-stamp-mode: t
  erc-autojoin-mode: t
  erc-autoaway-mode: t
  erc-networks-mode: t
  editorconfig-mode: t
  savehist-mode: t
  save-place-mode: t
  desktop-save-mode: t
  server-mode: t
  mu4e-thread-mode: t
  mu4e-compose-minor-mode: t
  mu4e-search-minor-mode: t
  hl-line-mode: t
  mu4e-update-minor-mode: t
  mu4e-context-minor-mode: t
  mu4e-modeline-mode: t
  tooltip-mode: t
  global-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
  minibuffer-regexp-mode: t
  buffer-read-only: 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:
/usr/share/emacs/site-lisp/which-key/which-key hides /usr/share/emacs/31.0.50/lisp/which-key
/usr/share/emacs/site-lisp/editorconfig-emacs/editorconfig-conf-mode hides /usr/share/emacs/31.0.50/lisp/editorconfig-conf-mode
/usr/share/emacs/site-lisp/editorconfig-emacs/editorconfig-core-handle hides /usr/share/emacs/31.0.50/lisp/editorconfig-core-handle
/usr/share/emacs/site-lisp/editorconfig-emacs/editorconfig-core hides /usr/share/emacs/31.0.50/lisp/editorconfig-core
/usr/share/emacs/site-lisp/editorconfig-emacs/editorconfig-fnmatch hides /usr/share/emacs/31.0.50/lisp/editorconfig-fnmatch
/usr/share/emacs/site-lisp/editorconfig-emacs/editorconfig-tools hides /usr/share/emacs/31.0.50/lisp/editorconfig-tools
/usr/share/emacs/site-lisp/editorconfig-emacs/editorconfig hides /usr/share/emacs/31.0.50/lisp/editorconfig
/usr/share/emacs/site-lisp/transient/transient hides /usr/share/emacs/31.0.50/lisp/transient
/usr/share/emacs/site-lisp/org-mode/ob hides /usr/share/emacs/31.0.50/lisp/org/ob
/usr/share/emacs/site-lisp/org-mode/oc-natbib hides /usr/share/emacs/31.0.50/lisp/org/oc-natbib
/usr/share/emacs/site-lisp/org-mode/oc hides /usr/share/emacs/31.0.50/lisp/org/oc
/usr/share/emacs/site-lisp/org-mode/ol-bbdb hides /usr/share/emacs/31.0.50/lisp/org/ol-bbdb
/usr/share/emacs/site-lisp/org-mode/ol-bibtex hides /usr/share/emacs/31.0.50/lisp/org/ol-bibtex
/usr/share/emacs/site-lisp/org-mode/ol-docview hides /usr/share/emacs/31.0.50/lisp/org/ol-docview
/usr/share/emacs/site-lisp/org-mode/ol-doi hides /usr/share/emacs/31.0.50/lisp/org/ol-doi
/usr/share/emacs/site-lisp/org-mode/ol-eshell hides /usr/share/emacs/31.0.50/lisp/org/ol-eshell
/usr/share/emacs/site-lisp/org-mode/ol-eww hides /usr/share/emacs/31.0.50/lisp/org/ol-eww
/usr/share/emacs/site-lisp/org-mode/ol-gnus hides /usr/share/emacs/31.0.50/lisp/org/ol-gnus
/usr/share/emacs/site-lisp/org-mode/ol-info hides /usr/share/emacs/31.0.50/lisp/org/ol-info
/usr/share/emacs/site-lisp/org-mode/ol-irc hides /usr/share/emacs/31.0.50/lisp/org/ol-irc
/usr/share/emacs/site-lisp/org-mode/ol-man hides /usr/share/emacs/31.0.50/lisp/org/ol-man
/usr/share/emacs/site-lisp/org-mode/ob-C hides /usr/share/emacs/31.0.50/lisp/org/ob-C
/usr/share/emacs/site-lisp/org-mode/ol-mhe hides /usr/share/emacs/31.0.50/lisp/org/ol-mhe
/usr/share/emacs/site-lisp/org-mode/ob-R hides /usr/share/emacs/31.0.50/lisp/org/ob-R
/usr/share/emacs/site-lisp/org-mode/ol-rmail hides /usr/share/emacs/31.0.50/lisp/org/ol-rmail
/usr/share/emacs/site-lisp/org-mode/ob-awk hides /usr/share/emacs/31.0.50/lisp/org/ob-awk
/usr/share/emacs/site-lisp/org-mode/ol-w3m hides /usr/share/emacs/31.0.50/lisp/org/ol-w3m
/usr/share/emacs/site-lisp/org-mode/ob-calc hides /usr/share/emacs/31.0.50/lisp/org/ob-calc
/usr/share/emacs/site-lisp/org-mode/ol hides /usr/share/emacs/31.0.50/lisp/org/ol
/usr/share/emacs/site-lisp/org-mode/org-agenda hides /usr/share/emacs/31.0.50/lisp/org/org-agenda
/usr/share/emacs/site-lisp/org-mode/ob-clojure hides /usr/share/emacs/31.0.50/lisp/org/ob-clojure
/usr/share/emacs/site-lisp/org-mode/org-archive hides /usr/share/emacs/31.0.50/lisp/org/org-archive
/usr/share/emacs/site-lisp/org-mode/ob-comint hides /usr/share/emacs/31.0.50/lisp/org/ob-comint
/usr/share/emacs/site-lisp/org-mode/org-attach-git hides /usr/share/emacs/31.0.50/lisp/org/org-attach-git
/usr/share/emacs/site-lisp/org-mode/oc-biblatex hides /usr/share/emacs/31.0.50/lisp/org/oc-biblatex
/usr/share/emacs/site-lisp/org-mode/org-attach hides /usr/share/emacs/31.0.50/lisp/org/org-attach
/usr/share/emacs/site-lisp/org-mode/ob-core hides /usr/share/emacs/31.0.50/lisp/org/ob-core
/usr/share/emacs/site-lisp/org-mode/org-capture hides /usr/share/emacs/31.0.50/lisp/org/org-capture
/usr/share/emacs/site-lisp/org-mode/ob-css hides /usr/share/emacs/31.0.50/lisp/org/ob-css
/usr/share/emacs/site-lisp/org-mode/org-clock hides /usr/share/emacs/31.0.50/lisp/org/org-clock
/usr/share/emacs/site-lisp/org-mode/ob-ditaa hides /usr/share/emacs/31.0.50/lisp/org/ob-ditaa
/usr/share/emacs/site-lisp/org-mode/org-colview hides /usr/share/emacs/31.0.50/lisp/org/org-colview
/usr/share/emacs/site-lisp/org-mode/ob-dot hides /usr/share/emacs/31.0.50/lisp/org/ob-dot
/usr/share/emacs/site-lisp/org-mode/org-compat hides /usr/share/emacs/31.0.50/lisp/org/org-compat
/usr/share/emacs/site-lisp/org-mode/ob-emacs-lisp hides /usr/share/emacs/31.0.50/lisp/org/ob-emacs-lisp
/usr/share/emacs/site-lisp/org-mode/org-crypt hides /usr/share/emacs/31.0.50/lisp/org/org-crypt
/usr/share/emacs/site-lisp/org-mode/ob-eshell hides /usr/share/emacs/31.0.50/lisp/org/ob-eshell
/usr/share/emacs/site-lisp/org-mode/org-ctags hides /usr/share/emacs/31.0.50/lisp/org/org-ctags
/usr/share/emacs/site-lisp/org-mode/ob-eval hides /usr/share/emacs/31.0.50/lisp/org/ob-eval
/usr/share/emacs/site-lisp/org-mode/org-cycle hides /usr/share/emacs/31.0.50/lisp/org/org-cycle
/usr/share/emacs/site-lisp/org-mode/ob-exp hides /usr/share/emacs/31.0.50/lisp/org/ob-exp
/usr/share/emacs/site-lisp/org-mode/org-datetree hides /usr/share/emacs/31.0.50/lisp/org/org-datetree
/usr/share/emacs/site-lisp/org-mode/ob-forth hides /usr/share/emacs/31.0.50/lisp/org/ob-forth
/usr/share/emacs/site-lisp/org-mode/org-duration hides /usr/share/emacs/31.0.50/lisp/org/org-duration
/usr/share/emacs/site-lisp/org-mode/ob-fortran hides /usr/share/emacs/31.0.50/lisp/org/ob-fortran
/usr/share/emacs/site-lisp/org-mode/org-element-ast hides /usr/share/emacs/31.0.50/lisp/org/org-element-ast
/usr/share/emacs/site-lisp/org-mode/oc-bibtex hides /usr/share/emacs/31.0.50/lisp/org/oc-bibtex
/usr/share/emacs/site-lisp/org-mode/org-element hides /usr/share/emacs/31.0.50/lisp/org/org-element
/usr/share/emacs/site-lisp/org-mode/ob-gnuplot hides /usr/share/emacs/31.0.50/lisp/org/ob-gnuplot
/usr/share/emacs/site-lisp/org-mode/org-entities hides /usr/share/emacs/31.0.50/lisp/org/org-entities
/usr/share/emacs/site-lisp/org-mode/ob-groovy hides /usr/share/emacs/31.0.50/lisp/org/ob-groovy
/usr/share/emacs/site-lisp/org-mode/org-faces hides /usr/share/emacs/31.0.50/lisp/org/org-faces
/usr/share/emacs/site-lisp/org-mode/ob-haskell hides /usr/share/emacs/31.0.50/lisp/org/ob-haskell
/usr/share/emacs/site-lisp/org-mode/org-feed hides /usr/share/emacs/31.0.50/lisp/org/org-feed
/usr/share/emacs/site-lisp/org-mode/ob-java hides /usr/share/emacs/31.0.50/lisp/org/ob-java
/usr/share/emacs/site-lisp/org-mode/org-fold-core hides /usr/share/emacs/31.0.50/lisp/org/org-fold-core
/usr/share/emacs/site-lisp/org-mode/ob-js hides /usr/share/emacs/31.0.50/lisp/org/ob-js
/usr/share/emacs/site-lisp/org-mode/org-fold hides /usr/share/emacs/31.0.50/lisp/org/org-fold
/usr/share/emacs/site-lisp/org-mode/ob-julia hides /usr/share/emacs/31.0.50/lisp/org/ob-julia
/usr/share/emacs/site-lisp/org-mode/org-footnote hides /usr/share/emacs/31.0.50/lisp/org/org-footnote
/usr/share/emacs/site-lisp/org-mode/ob-latex hides /usr/share/emacs/31.0.50/lisp/org/ob-latex
/usr/share/emacs/site-lisp/org-mode/org-goto hides /usr/share/emacs/31.0.50/lisp/org/org-goto
/usr/share/emacs/site-lisp/org-mode/ob-lilypond hides /usr/share/emacs/31.0.50/lisp/org/ob-lilypond
/usr/share/emacs/site-lisp/org-mode/org-habit hides /usr/share/emacs/31.0.50/lisp/org/org-habit
/usr/share/emacs/site-lisp/org-mode/ob-lisp hides /usr/share/emacs/31.0.50/lisp/org/ob-lisp
/usr/share/emacs/site-lisp/org-mode/org-id hides /usr/share/emacs/31.0.50/lisp/org/org-id
/usr/share/emacs/site-lisp/org-mode/ob-lob hides /usr/share/emacs/31.0.50/lisp/org/ob-lob
/usr/share/emacs/site-lisp/org-mode/org-indent hides /usr/share/emacs/31.0.50/lisp/org/org-indent
/usr/share/emacs/site-lisp/org-mode/ob-lua hides /usr/share/emacs/31.0.50/lisp/org/ob-lua
/usr/share/emacs/site-lisp/org-mode/org-inlinetask hides /usr/share/emacs/31.0.50/lisp/org/org-inlinetask
/usr/share/emacs/site-lisp/org-mode/oc-csl hides /usr/share/emacs/31.0.50/lisp/org/oc-csl
/usr/share/emacs/site-lisp/org-mode/org-keys hides /usr/share/emacs/31.0.50/lisp/org/org-keys
/usr/share/emacs/site-lisp/org-mode/ob-makefile hides /usr/share/emacs/31.0.50/lisp/org/ob-makefile
/usr/share/emacs/site-lisp/org-mode/org-lint hides /usr/share/emacs/31.0.50/lisp/org/org-lint
/usr/share/emacs/site-lisp/org-mode/ob-matlab hides /usr/share/emacs/31.0.50/lisp/org/ob-matlab
/usr/share/emacs/site-lisp/org-mode/org-list hides /usr/share/emacs/31.0.50/lisp/org/org-list
/usr/share/emacs/site-lisp/org-mode/ob-maxima hides /usr/share/emacs/31.0.50/lisp/org/ob-maxima
/usr/share/emacs/site-lisp/org-mode/org-macro hides /usr/share/emacs/31.0.50/lisp/org/org-macro
/usr/share/emacs/site-lisp/org-mode/ob-ocaml hides /usr/share/emacs/31.0.50/lisp/org/ob-ocaml
/usr/share/emacs/site-lisp/org-mode/org-macs hides /usr/share/emacs/31.0.50/lisp/org/org-macs
/usr/share/emacs/site-lisp/org-mode/ob-octave hides /usr/share/emacs/31.0.50/lisp/org/ob-octave
/usr/share/emacs/site-lisp/org-mode/org-mobile hides /usr/share/emacs/31.0.50/lisp/org/org-mobile
/usr/share/emacs/site-lisp/org-mode/ob-org hides /usr/share/emacs/31.0.50/lisp/org/ob-org
/usr/share/emacs/site-lisp/org-mode/org-mouse hides /usr/share/emacs/31.0.50/lisp/org/org-mouse
/usr/share/emacs/site-lisp/org-mode/ob-perl hides /usr/share/emacs/31.0.50/lisp/org/ob-perl
/usr/share/emacs/site-lisp/org-mode/org-num hides /usr/share/emacs/31.0.50/lisp/org/org-num
/usr/share/emacs/site-lisp/org-mode/ob-plantuml hides /usr/share/emacs/31.0.50/lisp/org/ob-plantuml
/usr/share/emacs/site-lisp/org-mode/org-pcomplete hides /usr/share/emacs/31.0.50/lisp/org/org-pcomplete
/usr/share/emacs/site-lisp/org-mode/ob-processing hides /usr/share/emacs/31.0.50/lisp/org/ob-processing
/usr/share/emacs/site-lisp/org-mode/org-persist hides /usr/share/emacs/31.0.50/lisp/org/org-persist
/usr/share/emacs/site-lisp/org-mode/ob-python hides /usr/share/emacs/31.0.50/lisp/org/ob-python
/usr/share/emacs/site-lisp/org-mode/org-plot hides /usr/share/emacs/31.0.50/lisp/org/org-plot
/usr/share/emacs/site-lisp/org-mode/ob-ref hides /usr/share/emacs/31.0.50/lisp/org/ob-ref
/usr/share/emacs/site-lisp/org-mode/org-protocol hides /usr/share/emacs/31.0.50/lisp/org/org-protocol
/usr/share/emacs/site-lisp/org-mode/ob-ruby hides /usr/share/emacs/31.0.50/lisp/org/ob-ruby
/usr/share/emacs/site-lisp/org-mode/org-refile hides /usr/share/emacs/31.0.50/lisp/org/org-refile
/usr/share/emacs/site-lisp/org-mode/ob-sass hides /usr/share/emacs/31.0.50/lisp/org/ob-sass
/usr/share/emacs/site-lisp/org-mode/org-src hides /usr/share/emacs/31.0.50/lisp/org/org-src
/usr/share/emacs/site-lisp/org-mode/ob-scheme hides /usr/share/emacs/31.0.50/lisp/org/ob-scheme
/usr/share/emacs/site-lisp/org-mode/org-table hides /usr/share/emacs/31.0.50/lisp/org/org-table
/usr/share/emacs/site-lisp/org-mode/ob-screen hides /usr/share/emacs/31.0.50/lisp/org/ob-screen
/usr/share/emacs/site-lisp/org-mode/org-tempo hides /usr/share/emacs/31.0.50/lisp/org/org-tempo
/usr/share/emacs/site-lisp/org-mode/ob-sed hides /usr/share/emacs/31.0.50/lisp/org/ob-sed
/usr/share/emacs/site-lisp/org-mode/org-timer hides /usr/share/emacs/31.0.50/lisp/org/org-timer
/usr/share/emacs/site-lisp/org-mode/ob-shell hides /usr/share/emacs/31.0.50/lisp/org/ob-shell
/usr/share/emacs/site-lisp/org-mode/org-version hides /usr/share/emacs/31.0.50/lisp/org/org-version
/usr/share/emacs/site-lisp/org-mode/ob-sql hides /usr/share/emacs/31.0.50/lisp/org/ob-sql
/usr/share/emacs/site-lisp/org-mode/org hides /usr/share/emacs/31.0.50/lisp/org/org
/usr/share/emacs/site-lisp/org-mode/ox-ascii hides /usr/share/emacs/31.0.50/lisp/org/ox-ascii
/usr/share/emacs/site-lisp/org-mode/ob-sqlite hides /usr/share/emacs/31.0.50/lisp/org/ob-sqlite
/usr/share/emacs/site-lisp/org-mode/ox-beamer hides /usr/share/emacs/31.0.50/lisp/org/ox-beamer
/usr/share/emacs/site-lisp/org-mode/ob-tangle hides /usr/share/emacs/31.0.50/lisp/org/ob-tangle
/usr/share/emacs/site-lisp/org-mode/ox-html hides /usr/share/emacs/31.0.50/lisp/org/ox-html
/usr/share/emacs/site-lisp/org-mode/ob-table hides /usr/share/emacs/31.0.50/lisp/org/ob-table
/usr/share/emacs/site-lisp/org-mode/ox-icalendar hides /usr/share/emacs/31.0.50/lisp/org/ox-icalendar
/usr/share/emacs/site-lisp/org-mode/oc-basic hides /usr/share/emacs/31.0.50/lisp/org/oc-basic
/usr/share/emacs/site-lisp/org-mode/ox-latex hides /usr/share/emacs/31.0.50/lisp/org/ox-latex
/usr/share/emacs/site-lisp/org-mode/ox-man hides /usr/share/emacs/31.0.50/lisp/org/ox-man
/usr/share/emacs/site-lisp/org-mode/ox-md hides /usr/share/emacs/31.0.50/lisp/org/ox-md
/usr/share/emacs/site-lisp/org-mode/ox-publish hides /usr/share/emacs/31.0.50/lisp/org/ox-publish
/usr/share/emacs/site-lisp/org-mode/ox-texinfo hides /usr/share/emacs/31.0.50/lisp/org/ox-texinfo
/usr/share/emacs/site-lisp/org-mode/ox-koma-letter hides /usr/share/emacs/31.0.50/lisp/org/ox-koma-letter
/usr/share/emacs/site-lisp/org-mode/org-loaddefs hides /usr/share/emacs/31.0.50/lisp/org/org-loaddefs
/usr/share/emacs/site-lisp/org-mode/ox-odt hides /usr/share/emacs/31.0.50/lisp/org/ox-odt
/usr/share/emacs/site-lisp/org-mode/ox hides /usr/share/emacs/31.0.50/lisp/org/ox
/usr/share/emacs/site-lisp/org-mode/ox-org hides /usr/share/emacs/31.0.50/lisp/org/ox-org
/usr/share/emacs/site-lisp/compat/compat hides /usr/share/emacs/31.0.50/lisp/emacs-lisp/compat

Features:
(shadow emacsbug edmacro kmacro network-stream nsm mailalias ispell
face-remap misearch multi-isearch shr-color color mm-archive qp sort
gnus-cite mail-extr textsec uni-scripts idna-mapping ucs-normalize
uni-confusable textsec-check cl-extra term/tmux term/xterm xterm
company-oddmuse company-keywords company-etags etags fileloop generator
xref project company-gtags company-dabbrev-code company-dabbrev
company-files company-clang company-capf company-cmake company-semantic
company-template company-bbdb flycheck-clang-tidy flycheck-pkgcheck
flycheck lisp-mnt help-mode company-ebuild company-ebuild-keywords
ebuild-mode-keywords company-ebuild-custom company ebuild-mode skeleton
exec-path-from-shell erc-track erc-ring erc-desktop-notifications
erc-netsplit erc-menu erc-match erc-list erc-goodies erc-pcomplete
erc-capab erc-button erc-fill erc-stamp erc-join erc-autoaway
tango-dark-theme erc erc-backend erc-networks erc-common erc-compat
compat erc-loaddefs cus-load warnings editorconfig editorconfig-core
editorconfig-core-handle editorconfig-fnmatch pcase savehist saveplace
desktop frameset server mu4e mu4e-org org ob ob-tangle ob-ref ob-lob
ob-table ob-exp org-macro org-src sh-script smie treesit executable
ob-comint org-pcomplete pcomplete org-list org-footnote org-faces
org-entities noutline outline ob-emacs-lisp ob-core ob-eval org-cycle
org-table ol rx org-fold org-fold-core org-keys oc org-loaddefs
find-func org-version org-compat org-macs format-spec mu4e-notification
notifications mu4e-main smtpmail mu4e-view mu4e-mime-parts thingatpt
comint ansi-osc ansi-color ring cal-menu calendar cal-loaddefs
mu4e-headers mu4e-thread mu4e-actions mu4e-compose mu4e-draft gnus-msg
gnus-art mm-uu mml2015 mm-view mml-smime smime gnutls dig gnus-sum
gnus-group gnus-undo gnus-start gnus-dbus dbus gnus-cloud nnimap nnmail
mail-source utf7 nnoo parse-time iso8601 gnus-spec gnus-int gnus-range
gnus-win gnus nnheader range wid-edit mu4e-search mu4e-lists
mu4e-bookmarks mu4e-mark mu4e-message shr pixel-fill kinsoku url-file
svg xml dom flow-fill mule-util hl-line mu4e-contacts mu4e-update
mu4e-folders mu4e-context mu4e-query-items mu4e-server mu4e-modeline
mu4e-vars mu4e-helpers mu4e-config mu4e-window bookmark pp ido message
sendmail yank-media puny dired dired-loaddefs rfc822 mml mml-sec epa
derived epg rfc6068 epg-config gnus-util text-property-search time-date
mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util
ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader
mu4e-obsolete site-gentoo info debbugs-autoloads package browse-url url
url-proxy url-privacy url-expand url-methods url-history url-cookie
generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs icons password-cache json
subr-x map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs cl-lib
rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode mwheel term/pgtk-win pgtk-win
term/common-win touch-screen pgtk-dnd 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 dbusbind inotify
dynamic-setting system-font-setting font-render-setting cairo gtk pgtk
lcms2 multi-tty move-toolbar make-network-process emacs)

Memory information:
((conses 16 552507 889714) (symbols 48 46726 146)
 (strings 32 185424 23113) (string-bytes 1 5063764) (vectors 16 80708)
 (vector-slots 8 1621094 247930) (floats 8 490 17390)
 (intervals 56 28924 13533) (buffers 992 26))

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 377 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#73441: 31.0.50; Unstable proced-refine-test failure
  2024-09-23 13:19 bug#73441: 31.0.50; Unstable proced-refine-test failure Sam James
@ 2024-09-27 13:00 ` Laurence Warne
  2024-10-15 14:52   ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 24+ messages in thread
From: Laurence Warne @ 2024-09-27 13:00 UTC (permalink / raw)
  To: Sam James; +Cc: mattiase, 73441

[-- Attachment #1: Type: text/plain, Size: 405 bytes --]

Hi,

I can't seem to reproduce despite running them for a while continuously.
Would you be able to share the contents of the Proced buffer before and
after the refinement in a flakey test run in addition to the PID refined on?

It might also be worth testing proced-refine works as expected for you when
refining by PID (in case the flakiness is hinting at some kind of
legitimate bug)?

Thanks, Laurence

[-- Attachment #2: Type: text/html, Size: 524 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#73441: 31.0.50; Unstable proced-refine-test failure
  2024-09-27 13:00 ` Laurence Warne
@ 2024-10-15 14:52   ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-10-25 16:46     ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 24+ messages in thread
From: Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-10-15 14:52 UTC (permalink / raw)
  To: Laurence Warne; +Cc: mattiase, 73441, Sam James

Laurence Warne <laurencewarne@gmail.com> writes:

> Hi,

Hi,

> I can't seem to reproduce despite running them for a while
> continuously.  Would you be able to share the contents of the Proced
> buffer before and after the refinement in a flakey test run in
> addition to the PID refined on?
>
> It might also be worth testing proced-refine works as expected for you
> when refining by PID (in case the flakiness is hinting at some kind of
> legitimate bug)?

FTR, the issue happens more often (always?) on emba. gnu.org, see for
example <https://emba.gnu.org/emacs/emacs/-/jobs/91334>. I'll try to
hunt it in that environment, although I cannot promise anything.

> Thanks, Laurence

Best regards, Michael.





^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#73441: 31.0.50; Unstable proced-refine-test failure
  2024-10-15 14:52   ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-10-25 16:46     ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-10-26 15:44       ` Laurence Warne
  0 siblings, 1 reply; 24+ messages in thread
From: Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-10-25 16:46 UTC (permalink / raw)
  To: Laurence Warne; +Cc: mattiase, 73441, Sam James

Michael Albinus <michael.albinus@gmx.de> writes:

Hi Laurence,

>> I can't seem to reproduce despite running them for a while
>> continuously.  Would you be able to share the contents of the Proced
>> buffer before and after the refinement in a flakey test run in
>> addition to the PID refined on?
>>
>> It might also be worth testing proced-refine works as expected for you
>> when refining by PID (in case the flakiness is hinting at some kind of
>> legitimate bug)?
>
> FTR, the issue happens more often (always?) on emba. gnu.org, see for
> example <https://emba.gnu.org/emacs/emacs/-/jobs/91334>. I'll try to
> hunt it in that environment, although I cannot promise anything.

I've instrumented proced-tests.el on emba. There was a failing
proced-refine-with-update-test. The *Proced* has shown the contents

--8<---------------cut here---------------start------------->8---
  root    0 root     0  1467  1465  1465     1 20   0 29.6  1.9 R          1 123 MiB  73 MiB         -1  31161      0 5347527     116  17:33 07:58 06:40 01:17 02:34  01:39  00:55 26:53 ../src/emacs --module-assertions --no-init-file --no-site-file --no-site-lisp -L :. -l ert --eval (setq\ treesit-extra-load-path\ '("/root/.emacs.d/tree-sitter")) -l lisp/net/tramp-tests.el --batch --eval (ert-run-tests-batch-and-exit\ (quote\ (not\ (or\ (tag\ :unstable)\ (tag\ :nativecomp)))))
  root    0 root     0 63763  1467 63763 63763 20   0  1.2  0.0 S          1 2.5 MiB 1.8 MiB pts0 74781  41825      0  891367       3  17:55 00:03 00:00 00:02 00:23  00:16  00:06 04:57 /bin/sh -i
  root    0 root     0 74781 63763 74781 63763 20   0  0.0  0.0 Z          1     0 B     0 B pts0 74781     70      0       0       0  18:00 00:00 00:00 00:00 00:00  00:00  00:00 00:00 [getfacl]
--8<---------------cut here---------------end--------------->8---

That is, the first process is the parent of the second process, and the
second process is the parent of the third process. However, the test
assumes, that the first process is the parent of all following
processes

Does this information helps? Do you need more instrumentation on emba?

>> Thanks, Laurence

Best regards, Michael.





^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#73441: 31.0.50; Unstable proced-refine-test failure
  2024-10-25 16:46     ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-10-26 15:44       ` Laurence Warne
  2024-10-26 16:59         ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-10-29  7:51         ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 2 replies; 24+ messages in thread
From: Laurence Warne @ 2024-10-26 15:44 UTC (permalink / raw)
  To: Michael Albinus; +Cc: mattiase, 73441, Sam James


[-- Attachment #1.1: Type: text/plain, Size: 717 bytes --]

Hi Michael,

Thanks for taking a look!  Ah I see, I thought that refining on the PID of
a process only filtered the buffer to show the process and it's direct
children but looking at 'proced-filter-children' this doesn't appear to be
the case.

I've attached a patch which changes the refinement tests to use the simpler
CPU refinement behaviour (keep everything with %CPU >= process at point),
which appears to work well.

On the downside, whilst running the new tests I noticed an occasional flake
with the 'proced-update-preserves-pid-at-point-test' test.  Unfortunately I
still can't find the root cause after debugging it for a while so I've
marked it as unstable in the patch for now as well.

Thanks, Laurence

[-- Attachment #1.2: Type: text/html, Size: 916 bytes --]

[-- Attachment #2: 0001-Fix-flakey-proced-refine-tests-Bug-73441.patch --]
[-- Type: text/x-patch, Size: 4429 bytes --]

From 151d90f01a1eab26cd0c2ba14dbd2b0175d50645 Mon Sep 17 00:00:00 2001
From: Laurence Warne <laurencewarne@gmail.com>
Date: Sat, 26 Oct 2024 11:05:56 +0100
Subject: [PATCH] Fix flakey proced refine tests (Bug#73441)

* test/lisp/proced-tests.el (proced-refine-test)
(proced-refine-with-update-test): Use the much simpler CPU refinement
for testing 'proced-refine'.  The previous tests made the incorrect
assumption that refining on the PID of process A only filtered the
buffer to contain process A and its children, whereas in actuality
the children of process A's children, their children, and so on will
also be shown.
(proced-update-preserves-pid-at-point-test): Mark as unstable.
---
 test/lisp/proced-tests.el | 43 ++++++++++++++++++---------------------
 1 file changed, 20 insertions(+), 23 deletions(-)

diff --git a/test/lisp/proced-tests.el b/test/lisp/proced-tests.el
index 6f16a241146..b612e172ffb 100644
--- a/test/lisp/proced-tests.el
+++ b/test/lisp/proced-tests.el
@@ -43,18 +43,14 @@ proced--assert-emacs-pid-in-buffer
 
 (defun proced--move-to-column (attribute)
   "Move to the column under ATTRIBUTE in the current proced buffer."
-  (move-to-column (string-match attribute proced-header-line)))
-
-(defun proced--assert-process-valid-pid-refinement (pid)
-  "Fail unless the process at point could be present after a refinement using PID."
-  (proced--move-to-column "PID")
-  (let ((pid-equal (string= pid (word-at-point))))
-    (should
-     (or pid-equal
-         ;; Guard against the unlikely event a platform doesn't support PPID
-         (when (string-match "PPID" proced-header-line)
-           (proced--move-to-column "PPID")
-           (string= pid (word-at-point)))))))
+  (move-to-column (string-match attribute proced-header-line))
+  ;; Sometimes the column entry does not fill the whole column.
+  (while (= (char-after (point)) ?\s) (forward-char)))
+
+(defun proced--assert-process-valid-cpu-refinement (cpu)
+  "Fail unless the process at point could be present after a refinement using CPU."
+  (proced--move-to-column "%CPU")
+  (should (>= (thing-at-point 'number) cpu)))
 
 (ert-deftest proced-format-test ()
   (dolist (format '(short medium long verbose))
@@ -85,26 +81,24 @@ proced-color-test
      (proced--assert-emacs-pid-in-buffer))))
 
 (ert-deftest proced-refine-test ()
-  ;;(skip-unless (memq system-type '(gnu/linux gnu/kfreebsd darwin)))
   (proced--within-buffer
    'verbose
    'user
-   ;; When refining on PID for process A, a process is kept if and only
-   ;; if its PID is the same as process A, or its parent process is
-   ;; process A.
-   (proced--move-to-column "PID")
-   (let ((pid (word-at-point)))
+   ;; When refining on %CPU for process A, a process is kept if and only
+   ;; if its %CPU is greater than or equal to that of process A.
+   (proced--move-to-column "%CPU")
+   (let ((cpu (thing-at-point 'number)))
      (proced-refine)
      (while (not (eobp))
-       (proced--assert-process-valid-pid-refinement pid)
+       (proced--assert-process-valid-cpu-refinement cpu)
        (forward-line)))))
 
 (ert-deftest proced-refine-with-update-test ()
   (proced--within-buffer
    'verbose
    'user
-   (proced--move-to-column "PID")
-   (let ((pid (word-at-point)))
+   (proced--move-to-column "%CPU")
+   (let ((cpu (thing-at-point 'number)))
      (proced-refine)
      ;; Don't use (proced-update t) since this will reset `proced-process-alist'
      ;; and it's possible the process refined on would have exited by that
@@ -112,10 +106,13 @@ proced-refine-with-update-test
      ;; processes again, causing the test to fail.
      (proced-update)
      (while (not (eobp))
-       (proced--assert-process-valid-pid-refinement pid)
+       (proced--assert-process-valid-cpu-refinement cpu)
        (forward-line)))))
 
 (ert-deftest proced-update-preserves-pid-at-point-test ()
+  ;; FIXME: Occasionally the cursor inexplicably changes to the first line which
+  ;; causes the test to file when the line isn't the Emacs process.
+  :tags '(:unstable)
   (proced--within-buffer
    'medium
    'user
@@ -128,7 +125,7 @@ proced-update-preserves-pid-at-point-test
            (old-window (get-buffer-window)))
        (select-window new-window)
        (with-current-buffer "*Proced*"
-         (proced-update t t))
+         (proced-update))
        (select-window old-window)
        (should (= pid (proced-pid-at-point)))))))
 
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* bug#73441: 31.0.50; Unstable proced-refine-test failure
  2024-10-26 15:44       ` Laurence Warne
@ 2024-10-26 16:59         ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-10-27 11:16           ` Laurence Warne
  2024-10-29  7:51         ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 1 reply; 24+ messages in thread
From: Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-10-26 16:59 UTC (permalink / raw)
  To: Laurence Warne; +Cc: mattiase, 73441, Sam James

Laurence Warne <laurencewarne@gmail.com> writes:

> Hi Michael,

Hi Laurence,

> Thanks for taking a look!  Ah I see, I thought that refining on the
> PID of a process only filtered the buffer to show the process and it's
> direct children but looking at 'proced-filter-children' this doesn't
> appear to be the case.
>
> I've attached a patch which changes the refinement tests to use the
> simpler CPU refinement behaviour (keep everything with %CPU >= process
> at point), which appears to work well.

Thanks.

Eli, can this go to emacs-30, or should it be for master?

> On the downside, whilst running the new tests I noticed an occasional
> flake with the 'proced-update-preserves-pid-at-point-test' test.
> Unfortunately I still can't find the root cause after debugging it for
> a while so I've marked it as unstable in the patch for now as well.

Thanks again. If you like we could instrument proced-tests.el in order
to hunt this on emba? Just say if so.

> Thanks, Laurence

Best regards, Michael.





^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#73441: 31.0.50; Unstable proced-refine-test failure
  2024-10-26 16:59         ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-10-27 11:16           ` Laurence Warne
  2024-10-27 11:47             ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 24+ messages in thread
From: Laurence Warne @ 2024-10-27 11:16 UTC (permalink / raw)
  To: Michael Albinus; +Cc: mattiase, 73441, Sam James

[-- Attachment #1: Type: text/plain, Size: 206 bytes --]

> Thanks again. If you like we could instrument proced-tests.el in order
> to hunt this on emba? Just say if so.

Thanks, but shouldn't be necessary, I can reproduce it locally (albeit only
in batch mode).

[-- Attachment #2: Type: text/html, Size: 305 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#73441: 31.0.50; Unstable proced-refine-test failure
  2024-10-27 11:16           ` Laurence Warne
@ 2024-10-27 11:47             ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-10-27 12:07               ` Eli Zaretskii
  0 siblings, 1 reply; 24+ messages in thread
From: Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-10-27 11:47 UTC (permalink / raw)
  To: Laurence Warne; +Cc: mattiase, 73441, Sam James

Laurence Warne <laurencewarne@gmail.com> writes:

Hi Laurence,

> Thanks, but shouldn't be necessary, I can reproduce it locally (albeit
> only in batch mode).

OK. So I'll just wait for the maintainer's flag where to push your other
patch, emacs-30 (which I prefer) or master.

Best reegards, Michael.





^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#73441: 31.0.50; Unstable proced-refine-test failure
  2024-10-27 11:47             ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-10-27 12:07               ` Eli Zaretskii
  2024-10-27 15:53                 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 24+ messages in thread
From: Eli Zaretskii @ 2024-10-27 12:07 UTC (permalink / raw)
  To: Michael Albinus; +Cc: mattiase, laurencewarne, 73441, sam

> Cc: mattiase@acm.org, 73441@debbugs.gnu.org, Sam James <sam@gentoo.org>
> Date: Sun, 27 Oct 2024 12:47:43 +0100
> From:  Michael Albinus via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> 
> Laurence Warne <laurencewarne@gmail.com> writes:
> 
> Hi Laurence,
> 
> > Thanks, but shouldn't be necessary, I can reproduce it locally (albeit
> > only in batch mode).
> 
> OK. So I'll just wait for the maintainer's flag where to push your other
> patch, emacs-30 (which I prefer) or master.

If it only affects the test suite, then emacs-30 is okay.

Thanks.





^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#73441: 31.0.50; Unstable proced-refine-test failure
  2024-10-27 12:07               ` Eli Zaretskii
@ 2024-10-27 15:53                 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 0 replies; 24+ messages in thread
From: Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-10-27 15:53 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: mattiase, laurencewarne, 73441-done, sam

Versdion: 30.1

Eli Zaretskii <eliz@gnu.org> writes:

Hi,

>> OK. So I'll just wait for the maintainer's flag where to push your other
>> patch, emacs-30 (which I prefer) or master.
>
> If it only affects the test suite, then emacs-30 is okay.

Done, pushed to emacs-30. Closing the bug.

> Thanks.

Best regards, Michael.





^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#73441: 31.0.50; Unstable proced-refine-test failure
  2024-10-26 15:44       ` Laurence Warne
  2024-10-26 16:59         ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-10-29  7:51         ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-10-29 21:26           ` Laurence Warne
  1 sibling, 1 reply; 24+ messages in thread
From: Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-10-29  7:51 UTC (permalink / raw)
  To: Laurence Warne; +Cc: mattiase, 73441, Sam James

Laurence Warne <laurencewarne@gmail.com> writes:

> Hi Michael,

Hi Laurence,

> Thanks for taking a look!  Ah I see, I thought that refining on the
> PID of a process only filtered the buffer to show the process and it's
> direct children but looking at 'proced-filter-children' this doesn't
> appear to be the case.
>
> I've attached a patch which changes the refinement tests to use the
> simpler CPU refinement behaviour (keep everything with %CPU >= process
> at point), which appears to work well.

I'll reopen this bug, because on emba there's still an error, occasionnally:

--8<---------------cut here---------------start------------->8---
Running 6 tests (2024-10-29 07:00:15+0000, selector `(not (tag :unstable))')
   passed  1/6  proced-color-test (0.027574 sec)
   passed  2/6  proced-format-test (0.156767 sec)
Test proced-refine-test backtrace:
  >=(nil 92.2)
  apply(>= (nil 92.2))
  proced--assert-process-valid-cpu-refinement(92.2)
  #f(compiled-function () #<bytecode 0x1b4b54e9d1659058>)()
  #f(compiled-function () #<bytecode -0x1703a0141b1acd6f>)()
  handler-bind-1(#f(compiled-function () #<bytecode -0x1703a0141b1acd6
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name proced-refine-test :documentation nil
  ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-m
  ert-run-tests((not (tag :unstable)) #f(compiled-function (event-type
  ert-run-tests-batch((not (tag :unstable)))
  ert-run-tests-batch-and-exit((not (tag :unstable)))
  eval((ert-run-tests-batch-and-exit '(not (tag :unstable))) t)
  command-line-1(("-L" ":." "-l" "ert" "--eval" "(setq treesit-extra-l
  command-line()
  normal-top-level()
Test proced-refine-test condition:
    (wrong-type-argument number-or-marker-p nil)
   FAILED  3/6  proced-refine-test (0.072968 sec) at lisp/proced-tests.el:83
   passed  4/6  proced-refine-with-update-test (0.042013 sec)
   passed  5/6  proced-revert-test (0.034675 sec)
   passed  6/6  proced-update-test (0.032764 sec)
Ran 6 tests, 5 results as expected, 1 unexpected (2024-10-29 07:00:15+0000, 0.533977 sec)
1 unexpected results:
   FAILED  proced-refine-test  number-or-marker-p
--8<---------------cut here---------------end--------------->8---

See for example <https://emba.gnu.org/emacs/emacs/-/jobs/92138#L1352>

> Thanks, Laurence

Best regards, Michael.





^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#73441: 31.0.50; Unstable proced-refine-test failure
  2024-10-29  7:51         ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-10-29 21:26           ` Laurence Warne
  2024-10-30 14:15             ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 24+ messages in thread
From: Laurence Warne @ 2024-10-29 21:26 UTC (permalink / raw)
  To: Michael Albinus; +Cc: mattiase, 73441, Sam James


[-- Attachment #1.1: Type: text/plain, Size: 562 bytes --]

Hi Michael,

Sorry it looks like I might have overlooked the case where a process has an
empty column for %CPU.  It sounds a bit strange and I can't reproduce it
(as in a process having a blank entry - though I'm guessing it's platform
dependent), but proced-refine appears to respect processes having a blank
entry for %CPU and include them so I guess it's correct to do so in the
tests too?

In the attached patch I also added an ert-explainer to the proced refine
tests so we should get info on the process that failed if it comes up again.

Thanks, Laurence

[-- Attachment #1.2: Type: text/html, Size: 688 bytes --]

[-- Attachment #2: 0001-Don-t-fail-proced-refine-tests-when-CPU-is-empty-Bug.patch --]
[-- Type: text/x-patch, Size: 2584 bytes --]

From 26c793ef1eb612b4997cc5157d10695f84030903 Mon Sep 17 00:00:00 2001
From: Laurence Warne <laurencewarne@gmail.com>
Date: Tue, 29 Oct 2024 20:19:44 +0000
Subject: [PATCH] Don't fail proced refine tests when CPU is empty (Bug#73441)

* test/lisp/proced-tests.el
(proced--assert-process-valid-cpu-refinement): Return t if the cpu
argument is nil.  'proced-refine' when applied to cpu will include
empty values, so by also checking nil we account for that possibility.
(proced--assert-process-valid-cpu-refinement-explainer): New function
for explaining refinement test failures in greater detail.
---
 test/lisp/proced-tests.el | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/test/lisp/proced-tests.el b/test/lisp/proced-tests.el
index b612e172ffb..59638dd63be 100644
--- a/test/lisp/proced-tests.el
+++ b/test/lisp/proced-tests.el
@@ -50,7 +50,19 @@ proced--move-to-column
 (defun proced--assert-process-valid-cpu-refinement (cpu)
   "Fail unless the process at point could be present after a refinement using CPU."
   (proced--move-to-column "%CPU")
-  (should (>= (thing-at-point 'number) cpu)))
+  (or (null cpu) (>= (thing-at-point 'number) cpu)))
+
+(defun proced--assert-process-valid-cpu-refinement-explainer (cpu)
+  "Explain the result of `proced--assert-process-valid-cpu-refinement'.
+
+CPU is as in `proced--assert-process-valid-cpu-refinement'."
+  `(unexpected-refinement
+    (header-line ,(substring-no-properties (cadr (proced-header-line))))
+    (process ,(thing-at-point 'line t))
+    (refined-value ,cpu)
+    (process-value ,(save-excursion (proced--move-to-column "%CPU") (thing-at-point 'number)))))
+
+(put 'proced--assert-process-valid-cpu-refinement 'ert-explainer #'proced--assert-process-valid-cpu-refinement-explainer)
 
 (ert-deftest proced-format-test ()
   (dolist (format '(short medium long verbose))
@@ -90,7 +102,7 @@ proced-refine-test
    (let ((cpu (thing-at-point 'number)))
      (proced-refine)
      (while (not (eobp))
-       (proced--assert-process-valid-cpu-refinement cpu)
+       (should (proced--assert-process-valid-cpu-refinement cpu))
        (forward-line)))))
 
 (ert-deftest proced-refine-with-update-test ()
@@ -106,7 +118,7 @@ proced-refine-with-update-test
      ;; processes again, causing the test to fail.
      (proced-update)
      (while (not (eobp))
-       (proced--assert-process-valid-cpu-refinement cpu)
+       (should (proced--assert-process-valid-cpu-refinement cpu))
        (forward-line)))))
 
 (ert-deftest proced-update-preserves-pid-at-point-test ()
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* bug#73441: 31.0.50; Unstable proced-refine-test failure
  2024-10-29 21:26           ` Laurence Warne
@ 2024-10-30 14:15             ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-10-30 18:25               ` Laurence Warne
  0 siblings, 1 reply; 24+ messages in thread
From: Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-10-30 14:15 UTC (permalink / raw)
  To: Laurence Warne; +Cc: mattiase, 73441, Sam James

Laurence Warne <laurencewarne@gmail.com> writes:

> Hi Michael,

Hi Laurence,

> Sorry it looks like I might have overlooked the case where a process
> has an empty column for %CPU.  It sounds a bit strange and I can't
> reproduce it (as in a process having a blank entry - though I'm
> guessing it's platform dependent), but proced-refine appears to
> respect processes having a blank entry for %CPU and include them so I
> guess it's correct to do so in the tests too?

Are you sure that this problem us due to a blank entry for %CPU? Is this
foreseen, or is this an error in proced-refine?

This I would like to know first.

> In the attached patch I also added an ert-explainer to the proced
> refine tests so we should get info on the process that failed if it
> comes up again.

Excellent idea!

I've pushed your patch to the emacs-30 branch, because first I'd like to
see how a blank entry for %CPU in proced-refine looks like. I've removed
the '(or (null cpu)' part in proced--assert-process-valid-cpu-refinement
in order to see the buffer. I've also adapeted
proced--assert-process-valid-cpu-refinement-explainer for better
formatting.

Based on the results of the next failing test we can decide how to continue.

> Thanks, Laurence

Best regards, Michael.





^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#73441: 31.0.50; Unstable proced-refine-test failure
  2024-10-30 14:15             ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-10-30 18:25               ` Laurence Warne
  2024-11-04 13:27                 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 24+ messages in thread
From: Laurence Warne @ 2024-10-30 18:25 UTC (permalink / raw)
  To: Michael Albinus; +Cc: mattiase, 73441, Sam James

[-- Attachment #1: Type: text/plain, Size: 219 bytes --]

> Are you sure that this problem us due to a blank entry for %CPU? Is this
> foreseen, or is this an error in proced-refine?

No I'm not sure at all (:.  Your suggestion sounds good to me, let me know
what it turns up!

[-- Attachment #2: Type: text/html, Size: 321 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#73441: 31.0.50; Unstable proced-refine-test failure
  2024-10-30 18:25               ` Laurence Warne
@ 2024-11-04 13:27                 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-11-09  8:31                   ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 24+ messages in thread
From: Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-11-04 13:27 UTC (permalink / raw)
  To: Laurence Warne; +Cc: mattiase, 73441, Sam James

Laurence Warne <laurencewarne@gmail.com> writes:

Hi Laurence,

>> Are you sure that this problem us due to a blank entry for %CPU? Is
>> this foreseen, or is this an error in proced-refine?
>
> No I'm not sure at all (:.  Your suggestion sounds good to me, let me
> know what it turns up!

Here we are:

--8<---------------cut here---------------start------------->8---
Running 6 tests (2024-11-04 06:11:36+0000, selector `(not (or (tag :unstable) (tag :nativecomp)))')
   passed  1/6  proced-color-test (0.217050 sec)
   passed  2/6  proced-format-test (0.532628 sec)
Test proced-refine-test backtrace:
  >=(nil 27.7)
  proced--assert-process-valid-cpu-refinement(27.7)
  apply(proced--assert-process-valid-cpu-refinement 27.7)
  (setq value-7 (apply fn-5 args-6))
  (unwind-protect (setq value-7 (apply fn-5 args-6)) (setq form-descri
  (if (unwind-protect (setq value-7 (apply fn-5 args-6)) (setq form-de
  (let (form-description-9) (if (unwind-protect (setq value-7 (apply f
  (let ((value-7 'ert-form-evaluation-aborted-8)) (let (form-descripti
  (let* ((fn-5 #'proced--assert-process-valid-cpu-refinement) (args-6
  (while (not (eobp)) (let* ((fn-5 #'proced--assert-process-valid-cpu-
  (let ((cpu (thing-at-point 'number))) (proced-refine) (while (not (e
  (save-current-buffer (set-buffer "*Proced*") (proced--move-to-column
  (unwind-protect (save-current-buffer (set-buffer "*Proced*") (proced
  (let ((proced-format 'verbose) (proced-filter 'user) (proced-auto-up
  #f(lambda () [t] (let ((proced-format 'verbose) (proced-filter 'user
  #f(compiled-function () #<bytecode -0x147321e8017461ef>)()
  handler-bind-1(#f(compiled-function () #<bytecode -0x147321e8017461e
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name proced-refine-test :documentation nil
  ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-m
  ert-run-tests((not (or (tag :unstable) (tag :nativecomp))) #f(compil
  ert-run-tests-batch((not (or (tag :unstable) (tag :nativecomp))))
  ert-run-tests-batch-and-exit((not (or (tag :unstable) (tag :nativeco
  eval((ert-run-tests-batch-and-exit '(not (or (tag :unstable) (tag :n
  command-line-1(("-L" ":." "-l" "ert" "--eval" "(setq treesit-extra-l
  command-line()
  normal-top-level()
Test proced-refine-test condition:
    (wrong-type-argument number-or-marker-p nil)
   FAILED  3/6  proced-refine-test (0.141030 sec) at lisp/proced-tests.el:100
   passed  4/6  proced-refine-with-update-test (0.153068 sec)
   passed  5/6  proced-revert-test (0.102235 sec)
   passed  6/6  proced-update-test (0.129922 sec)
Ran 6 tests, 5 results as expected, 1 unexpected (2024-11-04 06:11:38+0000, 2.200362 sec)
1 unexpected results:
   FAILED  proced-refine-test  number-or-marker-p
--8<---------------cut here---------------end--------------->8---

See <https://emba.gnu.org/emacs/emacs/-/jobs/92428#L1345>

As you see, your explainer hasn't fired. This is, because
(wrong-type-argument number-or-marker-p nil) is just a Lisp error, and
not triggered by should or should-not.

I've extended proced--assert-process-valid-cpu-refinement to call the
explainer also in case of Lisp errors. Pushed to the emacs-30
branch. Let's wait for the next occurence of the error on emba.

Best regards, Michael.





^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#73441: 31.0.50; Unstable proced-refine-test failure
  2024-11-04 13:27                 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-11-09  8:31                   ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-11-09 14:17                     ` Laurence Warne
  0 siblings, 1 reply; 24+ messages in thread
From: Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-11-09  8:31 UTC (permalink / raw)
  To: Laurence Warne; +Cc: mattiase, 73441, Sam James

Michael Albinus <michael.albinus@gmx.de> writes:

Hi Laurence,

Now we've got useful data:

--8<---------------cut here---------------start------------->8---
Test proced-refine-test condition:
    (ert-test-failed
     ((wrong-type-argument number-or-marker-p nil)
      (unexpected-refinement
       (header-line
	"  User EUID Group EGID   PID PPID  PGrp  Sess Pr  Ni %CPU %Mem Stat THCount   VSize    RSS TTY TPGID MinFlt MajFlt CMinFlt CMajFlt Start   Time UTime STime CTime CUTime CSTime ETime Args")
       (process
	"  root    0 root     0 73235 1467 73235 73235 20   0 -nan  0.0 Z          1     0 B    0 B        -1     71      0       0       0  06:10 00:00 00:00 00:00 00:00  00:00  00:00 00:00 [chown]\n")
       (refined-value 30.5) (process-value nil))))
   FAILED  3/6  proced-refine-test (0.188194 sec) at lisp/proced-tests.el:104
--8<---------------cut here---------------end--------------->8---

IIUC the problem is, that the %CPU column doesn't contain a number but
the value -nan.

I don't know whether this is a legal value. If yes, it must be supported
in proced--assert-process-valid-cpu-refinement. Otherwise, something in
proced.el must be fixed.

Best regards, Michael.





^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#73441: 31.0.50; Unstable proced-refine-test failure
  2024-11-09  8:31                   ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-11-09 14:17                     ` Laurence Warne
  2024-11-09 20:06                       ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 24+ messages in thread
From: Laurence Warne @ 2024-11-09 14:17 UTC (permalink / raw)
  To: Michael Albinus; +Cc: mattiase, 73441, Sam James

[-- Attachment #1: Type: text/plain, Size: 488 bytes --]

Hi Michael,

How strange, AFAICS the attribute values Proced uses are straight from
'process-attributes' so perhaps the issue is there? - we could add
'(process-attributes pid)' to the ert explainer to confirm it.

On the other hand, I don't see any harm in checking for degenerate values
like -nan in 'proced-<' (the doc of 'process-attributes' doesn't appear to
mention nan, not sure about the internals of that function but it doesn't
look like a legal value to me)?

Thanks, Laurence

[-- Attachment #2: Type: text/html, Size: 644 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#73441: 31.0.50; Unstable proced-refine-test failure
  2024-11-09 14:17                     ` Laurence Warne
@ 2024-11-09 20:06                       ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-11-09 21:18                         ` Laurence Warne
  0 siblings, 1 reply; 24+ messages in thread
From: Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-11-09 20:06 UTC (permalink / raw)
  To: Laurence Warne; +Cc: mattiase, 73441, Sam James

Laurence Warne <laurencewarne@gmail.com> writes:

> Hi Michael,

Hi Laurence,

> How strange, AFAICS the attribute values Proced uses are straight from
> 'process-attributes' so perhaps the issue is there? - we could add '
> (process-attributes pid)' to the ert explainer to confirm it.

We could add it to the explainer. However, the result of this
process-attributes call is not the same as we see in proced, because it
happens later.

Well, the pcpu slot of process-attributes is computed as

--8<---------------cut here---------------start------------->8---
		  pcpu = (100.0 * (s_time + u_time)
			  / (clocks_per_sec * float_time (etime)));
--8<---------------cut here---------------end--------------->8---

(see sysdep.c). If one of the operands is not proper, the result can be
a NaN indeed, like -0.0e+NaN.

proced-format-cpu formats with (format "%.1f" cpu). And if cpu is a NaN,
we see that string indeed, because (format "%.1f" -0.0e+NaN) => "-nan".

> On the other hand, I don't see any harm in checking for degenerate
> values like -nan in 'proced-<' (the doc of 'process-attributes'
> doesn't appear to mention nan, not sure about the internals of that
> function but it doesn't look like a legal value to me)?

Yes, checking for -nan seems to be the best choice we have. So we must
replace (thing-at-point 'number) with something else in proced-refine-test,
proced-refine-with-update-test, proced--assert-process-valid-cpu-refinement
and proced--assert-process-valid-cpu-refinement-explainer. Would you
like to provide a patch?

> Thanks, Laurence

Best regards, Michael.





^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#73441: 31.0.50; Unstable proced-refine-test failure
  2024-11-09 20:06                       ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-11-09 21:18                         ` Laurence Warne
  2024-11-10  8:35                           ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 24+ messages in thread
From: Laurence Warne @ 2024-11-09 21:18 UTC (permalink / raw)
  To: Michael Albinus; +Cc: mattiase, 73441, Sam James

[-- Attachment #1: Type: text/plain, Size: 740 bytes --]

> Yes, checking for -nan seems to be the best choice we have. So we must
> replace (thing-at-point 'number) with something else in
proced-refine-test,
> proced-refine-with-update-test,
proced--assert-process-valid-cpu-refinement
> and proced--assert-process-valid-cpu-refinement-explainer. Would you
> like to provide a patch?

I was thinking more along the lines of a 'isnan' check in 'proced-<' to the
effect of making it not appear in any refinements at all, but if you think
it's too much fretting about an edge case, I'm happy to provide a patch for
the tests only (as you describe)?

> (see sysdep.c). If one of the operands is not proper, the result can be
> a NaN indeed, like -0.0e+NaN.

Could you explain what is meant by proper?

[-- Attachment #2: Type: text/html, Size: 1103 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#73441: 31.0.50; Unstable proced-refine-test failure
  2024-11-09 21:18                         ` Laurence Warne
@ 2024-11-10  8:35                           ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-11-12 20:19                             ` Laurence Warne
  0 siblings, 1 reply; 24+ messages in thread
From: Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-11-10  8:35 UTC (permalink / raw)
  To: Laurence Warne; +Cc: mattiase, 73441, Sam James

Laurence Warne <laurencewarne@gmail.com> writes:

Hi Laurence,

>> Yes, checking for -nan seems to be the best choice we have. So we must
>> replace (thing-at-point 'number) with something else in proced-refine-test,
>> proced-refine-with-update-test, proced--assert-process-valid-cpu-refinement
>> and proced--assert-process-valid-cpu-refinement-explainer. Would you
>> like to provide a patch?
>
> I was thinking more along the lines of a 'isnan' check in 'proced-<'
> to the effect of making it not appear in any refinements at all,

This might be useful, yes. But I don't know whether this is a restriction
people could dislike.

> but if you think it's too much fretting about an edge case, I'm happy
> to provide a patch for the tests only (as you describe)?

The backtrace of the last seen error on emba was

--8<---------------cut here---------------start------------->8---
Test proced-refine-test backtrace:
  signal(ert-test-failed (((wrong-type-argument number-or-marker-p nil
  ert-fail(((wrong-type-argument number-or-marker-p nil) (unexpected-r
  (condition-case err (>= (thing-at-point 'number) cpu) (error (ert-fa
  proced--assert-process-valid-cpu-refinement(30.5)
  apply(proced--assert-process-valid-cpu-refinement 30.5)
  (setq value-7 (apply fn-5 args-6))
  (unwind-protect (setq value-7 (apply fn-5 args-6)) (setq form-descri
  (if (unwind-protect (setq value-7 (apply fn-5 args-6)) (setq form-de
  (let (form-description-9) (if (unwind-protect (setq value-7 (apply f
  (let ((value-7 'ert-form-evaluation-aborted-8)) (let (form-descripti
  (let* ((fn-5 #'proced--assert-process-valid-cpu-refinement) (args-6
  (while (not (eobp)) (let* ((fn-5 #'proced--assert-process-valid-cpu-
  (let ((cpu (thing-at-point 'number))) (proced-refine) (while (not (e
  (save-current-buffer (set-buffer "*Proced*") (proced--move-to-column
  (unwind-protect (save-current-buffer (set-buffer "*Proced*") (proced
  (let ((proced-format 'verbose) (proced-filter 'user) (proced-auto-up
  #f(lambda () [t] (let ((proced-format 'verbose) (proced-filter 'user
  #f(compiled-function () #<bytecode -0x147321e8017461ef>)()
  handler-bind-1(#f(compiled-function () #<bytecode -0x147321e8017461e
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name proced-refine-test :documentation nil
  ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-m
  ert-run-tests((not (or (tag :unstable) (tag :nativecomp))) #f(compil
  ert-run-tests-batch((not (or (tag :unstable) (tag :nativecomp))))
  ert-run-tests-batch-and-exit((not (or (tag :unstable) (tag :nativeco
  eval((ert-run-tests-batch-and-exit '(not (or (tag :unstable) (tag :n
  command-line-1(("-L" ":." "-l" "ert" "--eval" "(setq treesit-extra-l
  command-line()
  normal-top-level()
Test proced-refine-test condition:
    (ert-test-failed
     ((wrong-type-argument number-or-marker-p nil)
      (unexpected-refinement
       (header-line
	"  User EUID Group EGID   PID PPID  PGrp  Sess Pr  Ni %CPU %Mem Stat THCount   VSize    RSS TTY TPGID MinFlt MajFlt CMinFlt CMajFlt Start   Time UTime STime CTime CUTime CSTime ETime Args")
       (process
	"  root    0 root     0 73235 1467 73235 73235 20   0 -nan  0.0 Z          1     0 B    0 B        -1     71      0       0       0  06:10 00:00 00:00 00:00 00:00  00:00  00:00 00:00 [chown]\n")
       (refined-value 30.5) (process-value nil))))
   FAILED  3/6  proced-refine-test (0.188194 sec) at lisp/proced-tests.el:104
--8<---------------cut here---------------end--------------->8---

So if we harden the (thing-at-point 'number) calls it would stabilize
the tests as well.

>> (see sysdep.c). If one of the operands is not proper, the result can be
>> a NaN indeed, like -0.0e+NaN.
>
> Could you explain what is meant by proper?

--8<---------------cut here---------------start------------->8---
		  pcpu = (100.0 * (s_time + u_time)
			  / (clocks_per_sec * float_time (etime)));
--8<---------------cut here---------------end--------------->8---

For example, if mtime is 0. This returns 1.0e+INF, but that is a NaN as
well. Or if s_time or u_time aren't floating point numbers.

Best regards, Michael.





^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#73441: 31.0.50; Unstable proced-refine-test failure
  2024-11-10  8:35                           ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-11-12 20:19                             ` Laurence Warne
  2024-11-13  8:04                               ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 24+ messages in thread
From: Laurence Warne @ 2024-11-12 20:19 UTC (permalink / raw)
  To: Michael Albinus; +Cc: mattiase, 73441, Sam James


[-- Attachment #1.1: Type: text/plain, Size: 139 bytes --]

Hi Michael,

I added a conditional skip for the refine tests if it looks like there's a
NaN, let me know if it looks ok.

Thanks, Laurence

[-- Attachment #1.2: Type: text/html, Size: 227 bytes --]

[-- Attachment #2: 0001-Don-t-error-in-Proced-tests-if-CPU-is-a-NaN.patch --]
[-- Type: text/x-patch, Size: 2951 bytes --]

From 42edc941060d1366ad91765f010ef71d838bea42 Mon Sep 17 00:00:00 2001
From: Laurence Warne <laurencewarne@gmail.com>
Date: Tue, 12 Nov 2024 19:42:23 +0000
Subject: [PATCH] Don't error in Proced tests if %CPU is a NaN

* test/lisp/proced-tests.el (proced--cpu-at-point): New function.
(proced--assert-process-valid-cpu-refinement)
(proced-refine-test, proced-refine-with-update-test): If %CPU for any
process visited is a NaN skip the test.
(proced-update-preserves-pid-at-point-test): Fix typo in comment.
---
 test/lisp/proced-tests.el | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/test/lisp/proced-tests.el b/test/lisp/proced-tests.el
index 3dc7e065afa..9f39be6ebd1 100644
--- a/test/lisp/proced-tests.el
+++ b/test/lisp/proced-tests.el
@@ -35,6 +35,15 @@ proced--within-buffer
            ,@body)
        (kill-buffer "*Proced*"))))
 
+(defun proced--cpu-at-point ()
+  "Return as an integer the current CPU value at point."
+  (if (string-suffix-p "nan" (thing-at-point 'sexp))
+      (let ((pid (proced-pid-at-point)))
+        (ert-skip
+         (format
+          "Found NaN value for %%CPU at point for process with PID %d" pid)))
+    (thing-at-point 'number)))
+
 (defun proced--assert-emacs-pid-in-buffer ()
   "Fail unless the process ID of the current Emacs process exists in buffer."
   (should (string-match-p
@@ -51,7 +60,7 @@ proced--assert-process-valid-cpu-refinement
   "Fail unless the process at point could be present after a refinement using CPU."
   (proced--move-to-column "%CPU")
   (condition-case err
-      (>= (thing-at-point 'number) cpu)
+      (>= (proced--cpu-at-point) cpu)
     (error
      (ert-fail
       (list err (proced--assert-process-valid-cpu-refinement-explainer cpu))))))
@@ -108,7 +117,7 @@ proced-refine-test
    ;; When refining on %CPU for process A, a process is kept if and only
    ;; if its %CPU is greater than or equal to that of process A.
    (proced--move-to-column "%CPU")
-   (let ((cpu (thing-at-point 'number)))
+   (let ((cpu (proced--cpu-at-point)))
      (proced-refine)
      (while (not (eobp))
        (should (proced--assert-process-valid-cpu-refinement cpu))
@@ -119,7 +128,7 @@ proced-refine-with-update-test
    'verbose
    'user
    (proced--move-to-column "%CPU")
-   (let ((cpu (thing-at-point 'number)))
+   (let ((cpu (proced--cpu-at-point)))
      (proced-refine)
      ;; Don't use (proced-update t) since this will reset `proced-process-alist'
      ;; and it's possible the process refined on would have exited by that
@@ -132,7 +141,7 @@ proced-refine-with-update-test
 
 (ert-deftest proced-update-preserves-pid-at-point-test ()
   ;; FIXME: Occasionally the cursor inexplicably changes to the first line which
-  ;; causes the test to file when the line isn't the Emacs process.
+  ;; causes the test to fail when the line isn't the Emacs process.
   :tags '(:unstable)
   (proced--within-buffer
    'medium
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* bug#73441: 31.0.50; Unstable proced-refine-test failure
  2024-11-12 20:19                             ` Laurence Warne
@ 2024-11-13  8:04                               ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-11-14 18:24                                 ` Laurence Warne
  0 siblings, 1 reply; 24+ messages in thread
From: Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-11-13  8:04 UTC (permalink / raw)
  To: Laurence Warne; +Cc: mattiase, 73441, Sam James

Laurence Warne <laurencewarne@gmail.com> writes:

> Hi Michael,

Ni Laurence,

> I added a conditional skip for the refine tests if it looks like
> there's a NaN, let me know if it looks ok.

Thanks. In general it looks fine, but I have one nit: In
proced--assert-process-valid-cpu-refinement-explainer you still call
(thing-at-point 'number). But the explainer is active in case of
problems, so it is likely that there isn't a number. Wouldn't it be
better to call (thing-at-point 'symbol)? Or something like
(or (thing-at-point 'number) (thing-at-point 'sexp))?

> Thanks, Laurence

Best regards, Michael.





^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#73441: 31.0.50; Unstable proced-refine-test failure
  2024-11-13  8:04                               ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-11-14 18:24                                 ` Laurence Warne
  2024-11-15 15:25                                   ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 24+ messages in thread
From: Laurence Warne @ 2024-11-14 18:24 UTC (permalink / raw)
  To: Michael Albinus; +Cc: mattiase, 73441, Sam James


[-- Attachment #1.1: Type: text/plain, Size: 148 bytes --]

Hi Michael,

Makes sense, I also added the output of '(process-attributes pid)' to the
explainer (I think I mentioned it before).

Thanks, Laurence

[-- Attachment #1.2: Type: text/html, Size: 271 bytes --]

[-- Attachment #2: 0001-Don-t-error-in-Proced-tests-if-CPU-is-a-NaN.patch --]
[-- Type: text/x-patch, Size: 3966 bytes --]

From ae05a1d8fc0f6b0896ac53d5e91a1c972c52316e Mon Sep 17 00:00:00 2001
From: Laurence Warne <laurencewarne@gmail.com>
Date: Tue, 12 Nov 2024 19:42:23 +0000
Subject: [PATCH] Don't error in Proced tests if %CPU is a NaN

* test/lisp/proced-tests.el (proced--cpu-at-point): New function.
(proced--assert-process-valid-cpu-refinement)
(proced-refine-test, proced-refine-with-update-test): If %CPU for any
process visited is a NaN skip the test.
(proced-update-preserves-pid-at-point-test): Fix typo in comment.
(proced--assert-process-valid-cpu-refinement-explainer): Add process
attributes to the explainer along with tweaking how the process %CPU is
obtained to account for circumstances where it's not numeric (most
notably '-nan').
---
 test/lisp/proced-tests.el | 24 ++++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)

diff --git a/test/lisp/proced-tests.el b/test/lisp/proced-tests.el
index 3dc7e065afa..65afeeb5f08 100644
--- a/test/lisp/proced-tests.el
+++ b/test/lisp/proced-tests.el
@@ -35,6 +35,15 @@ proced--within-buffer
            ,@body)
        (kill-buffer "*Proced*"))))
 
+(defun proced--cpu-at-point ()
+  "Return as an integer the current CPU value at point."
+  (if (string-suffix-p "nan" (thing-at-point 'sexp))
+      (let ((pid (proced-pid-at-point)))
+        (ert-skip
+         (format
+          "Found NaN value for %%CPU at point for process with PID %d" pid)))
+    (thing-at-point 'number)))
+
 (defun proced--assert-emacs-pid-in-buffer ()
   "Fail unless the process ID of the current Emacs process exists in buffer."
   (should (string-match-p
@@ -51,7 +60,7 @@ proced--assert-process-valid-cpu-refinement
   "Fail unless the process at point could be present after a refinement using CPU."
   (proced--move-to-column "%CPU")
   (condition-case err
-      (>= (thing-at-point 'number) cpu)
+      (>= (proced--cpu-at-point) cpu)
     (error
      (ert-fail
       (list err (proced--assert-process-valid-cpu-refinement-explainer cpu))))))
@@ -64,11 +73,14 @@ proced--assert-process-valid-cpu-refinement-explainer
     (header-line
      ,(substring-no-properties
        (string-replace "%%" "%" (cadr (proced-header-line)))))
-    (process ,(thing-at-point 'line t))
+    (buffer-process-line ,(thing-at-point 'line t))
+    (process-attributes ,(format "%s" (process-attributes (proced-pid-at-point))))
     (refined-value ,cpu)
     (process-value
      ,(save-excursion
-        (proced--move-to-column "%CPU") (thing-at-point 'number)))))
+        (proced--move-to-column "%CPU")
+        (or (thing-at-point 'number)
+            (substring-no-properties (thing-at-point 'sexp)))))))
 
 (put #'proced--assert-process-valid-cpu-refinement 'ert-explainer
      #'proced--assert-process-valid-cpu-refinement-explainer)
@@ -108,7 +120,7 @@ proced-refine-test
    ;; When refining on %CPU for process A, a process is kept if and only
    ;; if its %CPU is greater than or equal to that of process A.
    (proced--move-to-column "%CPU")
-   (let ((cpu (thing-at-point 'number)))
+   (let ((cpu (proced--cpu-at-point)))
      (proced-refine)
      (while (not (eobp))
        (should (proced--assert-process-valid-cpu-refinement cpu))
@@ -119,7 +131,7 @@ proced-refine-with-update-test
    'verbose
    'user
    (proced--move-to-column "%CPU")
-   (let ((cpu (thing-at-point 'number)))
+   (let ((cpu (proced--cpu-at-point)))
      (proced-refine)
      ;; Don't use (proced-update t) since this will reset `proced-process-alist'
      ;; and it's possible the process refined on would have exited by that
@@ -132,7 +144,7 @@ proced-refine-with-update-test
 
 (ert-deftest proced-update-preserves-pid-at-point-test ()
   ;; FIXME: Occasionally the cursor inexplicably changes to the first line which
-  ;; causes the test to file when the line isn't the Emacs process.
+  ;; causes the test to fail when the line isn't the Emacs process.
   :tags '(:unstable)
   (proced--within-buffer
    'medium
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* bug#73441: 31.0.50; Unstable proced-refine-test failure
  2024-11-14 18:24                                 ` Laurence Warne
@ 2024-11-15 15:25                                   ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 0 replies; 24+ messages in thread
From: Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-11-15 15:25 UTC (permalink / raw)
  To: Laurence Warne; +Cc: mattiase, 73441-done, Sam James

Version: 30.1

Laurence Warne <laurencewarne@gmail.com> writes:

> Hi Michael,

Hi Laurence,

> Makes sense, I also added the output of '(process-attributes pid)' to
> the explainer (I think I mentioned it before).

Thanks for the revised patch. I've pushed it to the emacs-30 branch,
closing the bug.

> Thanks, Laurence

Best regards, Michael.





^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2024-11-15 15:25 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-23 13:19 bug#73441: 31.0.50; Unstable proced-refine-test failure Sam James
2024-09-27 13:00 ` Laurence Warne
2024-10-15 14:52   ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-25 16:46     ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-26 15:44       ` Laurence Warne
2024-10-26 16:59         ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-27 11:16           ` Laurence Warne
2024-10-27 11:47             ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-27 12:07               ` Eli Zaretskii
2024-10-27 15:53                 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-29  7:51         ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-29 21:26           ` Laurence Warne
2024-10-30 14:15             ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-30 18:25               ` Laurence Warne
2024-11-04 13:27                 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-09  8:31                   ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-09 14:17                     ` Laurence Warne
2024-11-09 20:06                       ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-09 21:18                         ` Laurence Warne
2024-11-10  8:35                           ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-12 20:19                             ` Laurence Warne
2024-11-13  8:04                               ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-14 18:24                                 ` Laurence Warne
2024-11-15 15:25                                   ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).