bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#59842: [PATCH] Make proced-update Preserve Refinements


From: Laurence Warne
Subject: bug#59842: [PATCH] Make proced-update Preserve Refinements
Date: Thu, 8 Dec 2022 19:06:35 +0000

> Thanks.  Unfortunately, we don't have a test suite for proced.el, so
> non-trivial changes to it always ruin the risk of producing regressions.
> How to test this, and how did you test it?

If it's helpful, I've attached a (seperate) patch containing a test suite (or at least the start of) for proced.el (though some parts are somewhat awkward - mainly testing the proced buffer contains strings we would expect - of course comments on the approach welcome), the last test there: 'proced-refine-with-update-test' fails without the original patch.  I didn't want to conflate the original patch with it, I can open a new report with it if you prefer.

> What happens if that process did exit?  Shouldn't we reset
> proced-refinements to nil?

This could lead to bad behaviour if multiple refinements are active in a buffer, for example if I refine by CPU usage of process A (which makes proced only show processes with usage >= process A's) and then again by the CPU usage of process B, if process A exits, our second refinement is still valid (given process B is still running) eventhough the first isn't.  We could remove the refinement from the list, but it wouldn't change the behaviour.

Thanks, Laurence

Attachment: 0001-Make-proced-update-preserve-refinements.patch
Description: Text Data

Attachment: 0001-Add-tests-for-proced.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]