Subject: Re: bug#73441: 31.0.50; Unstable proced-refine-test failure

From: Michael Albinus <[email-masked]>
Date: Mon, 04 Nov 2024 14:27:48 +0100

Laurence Warne <[email-masked]> 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.