* [PATCH net-next] selftests: net: prevent Python from buffering the output
@ 2025-07-16 20:57 Jakub Kicinski
2025-07-17 10:51 ` Petr Machata
2025-07-17 23:50 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Jakub Kicinski @ 2025-07-16 20:57 UTC (permalink / raw)
To: davem
Cc: netdev, edumazet, pabeni, andrew+netdev, horms, Jakub Kicinski,
shuah, petrm, sdf
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.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: shuah@kernel.org
CC: petrm@nvidia.com
CC: sdf@fomichev.me
---
tools/testing/selftests/net/lib/py/ksft.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/net/lib/py/ksft.py b/tools/testing/selftests/net/lib/py/ksft.py
index 61287c203b6e..8e35ed12ed9e 100644
--- a/tools/testing/selftests/net/lib/py/ksft.py
+++ b/tools/testing/selftests/net/lib/py/ksft.py
@@ -32,6 +32,7 @@ KSFT_DISRUPTIVE = True
def ksft_pr(*objs, **kwargs):
+ kwargs["flush"] = True
print("#", *objs, **kwargs)
@@ -139,7 +140,7 @@ KSFT_DISRUPTIVE = True
res += "." + str(case.__name__)
if comment:
res += " # " + comment
- print(res)
+ print(res, flush=True)
def ksft_flush_defer():
@@ -227,8 +228,8 @@ KSFT_DISRUPTIVE = True
totals = {"pass": 0, "fail": 0, "skip": 0, "xfail": 0}
- print("TAP version 13")
- print("1.." + str(len(cases)))
+ print("TAP version 13", flush=True)
+ print("1.." + str(len(cases)), flush=True)
global KSFT_RESULT
cnt = 0
--
2.50.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] selftests: net: prevent Python from buffering the output
2025-07-16 20:57 [PATCH net-next] selftests: net: prevent Python from buffering the output Jakub Kicinski
@ 2025-07-17 10:51 ` Petr Machata
2025-07-17 23:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Petr Machata @ 2025-07-17 10:51 UTC (permalink / raw)
To: Jakub Kicinski
Cc: davem, netdev, edumazet, pabeni, andrew+netdev, horms, shuah,
petrm, sdf
Jakub Kicinski <kuba@kernel.org> writes:
> 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.
>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
The flush keyword was introduced in 3.3, now out of support, so this
should be safe.
Reviewed-by: Petr Machata <petrm@nvidia.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] selftests: net: prevent Python from buffering the output
2025-07-16 20:57 [PATCH net-next] selftests: net: prevent Python from buffering the output Jakub Kicinski
2025-07-17 10:51 ` Petr Machata
@ 2025-07-17 23:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-07-17 23:50 UTC (permalink / raw)
To: Jakub Kicinski
Cc: davem, netdev, edumazet, pabeni, andrew+netdev, horms, shuah,
petrm, sdf
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Wed, 16 Jul 2025 13:57:12 -0700 you wrote:
> 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.
>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
>
> [...]
Here is the summary with links:
- [net-next] selftests: net: prevent Python from buffering the output
https://git.kernel.org/netdev/net-next/c/797f080c463d
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-07-17 23:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-16 20:57 [PATCH net-next] selftests: net: prevent Python from buffering the output Jakub Kicinski
2025-07-17 10:51 ` Petr Machata
2025-07-17 23:50 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).