Subject: Re: bug#63550: proced-refine-with-update-test is racy

From: Mattias Engdegård <[email-masked]>
Date: Wed, 24 May 2023 09:56:22 +0200

21 maj 2023 kl. 20.45 skrev Laurence Warne <[email-masked]>:

> One thing I've noticed about the failing test is that we should probably use `(proced-update)` instead of `(proced-update t)` so as not to refresh `proced-process-alist` (I've attached a patch).  When I first saw this, I thought this would fix the failure as I thought what might have been happening was that the process used for the refinement might have exited between proced being called, and then `(proced-update t)` being called, but I think the test should still pass in this case (though I've optimistically used 'fix' in the patch commit (: ).

These steps seem to provoke a failure of the original test quite reliably on macOS:

1. add the call (sleep-for 1) both before and after (proced-refine), to widen the windows
2. in a different terminal, keep the command

  while true; do /bin/sleep 2 & sleep 0.1; done

running during the test, to create some churn in the process tables. (I'm using zsh if it matters.)

Changing (proced-update t) to (proced-update) does appear to remove the failure. Maybe you can decide whether it is better or not.