Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

selftests: net: prevent Python from buffering the output

Make sure Python doesn't buffer the output, otherwise for some
tests we may see false positive timeouts in NIPA. NIPA thinks that
a machine has hung if the test doesn't print anything for 3min.
This is also nice to heave for running the tests manually,
especially in vng.

Reviewed-by: Petr Machata <petrm@nvidia.com>
Link: https://patch.msgid.link/20250716205712.1787325-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+4 -3
+4 -3
tools/testing/selftests/net/lib/py/ksft.py
··· 32 32 33 33 34 34 def ksft_pr(*objs, **kwargs): 35 + kwargs["flush"] = True 35 36 print("#", *objs, **kwargs) 36 37 37 38 ··· 140 139 res += "." + str(case.__name__) 141 140 if comment: 142 141 res += " # " + comment 143 - print(res) 142 + print(res, flush=True) 144 143 145 144 146 145 def ksft_flush_defer(): ··· 228 227 229 228 totals = {"pass": 0, "fail": 0, "skip": 0, "xfail": 0} 230 229 231 - print("TAP version 13") 232 - print("1.." + str(len(cases))) 230 + print("TAP version 13", flush=True) 231 + print("1.." + str(len(cases)), flush=True) 233 232 234 233 global KSFT_RESULT 235 234 cnt = 0