On Thu, Aug 27, 2026, at 22:28, Jakub Kicinski wrote:
On Wed, 26 Aug 2026 13:18:18 -0400 Willem de Bruijn wrote:
quoted
quoted
+def check_dmesg_clean(func: str) -> bool:
+ with subprocess.Popen(['dmesg'], stdout=subprocess.PIPE) as dmesg:
+ res = subprocess.run(['grep', '-q', f'WARNING:.*{func}'], stdin=dmesg.stdout, check=False)
+ return res.returncode != 0 and dmesg.returncode == 0
+
+
+@contextmanager
Interesting approach. In ksft the built-in defer() mechanism may be
preferred. Not sure.
+1 small preference towards defer() if Alice is willing.
It's be more idiomatic for our selftests
No problem, I can switch to defer, thanks for the suggestion.
More importantly ruff check and pylink --disable=R have to be clean
for new tests. The test cases need a docstring explaining what they are
trying to test. The helpers can probably get a _ prefix to mark them
as private and silence the warning.
Got it, will do. I thought it was OK, because all tests I saw didn't
have docstrings.
--
pw-bot: cr