]> git.eshelyaron.com Git - emacs.git/commit
Don't error in Proced tests if %CPU is a NaN
authorLaurence Warne <laurencewarne@gmail.com>
Fri, 15 Nov 2024 15:22:52 +0000 (16:22 +0100)
committerEshel Yaron <me@eshelyaron.com>
Wed, 27 Nov 2024 19:48:18 +0000 (20:48 +0100)
commitd4cbb29c92b308a8e4f9aa5aa7c60ff185818405
treeeb978e3ed4daa4ca4dd000fdeaf1303382c457bb
parent138a9dd35bdc7bfb5825bbca17174ababea7ddad
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').

(cherry picked from commit 926d47ab2ca72054f1a5c774916927160a839dc1)
test/lisp/proced-tests.el