selftests: net: Fix minor issues in cork_fragsize.py
Subsystems (3)
PATCH 1/1 selftests: net: Fix minor issues in cork_fragsize.py
From: Alice Mikityanska <[email protected]>
return None is unreachable in check_kernel_config, because the try block always returns a True or False value, and the except block continues the loop. The return None was supposed to be outside the for loop, to make pylint happy by making all the flows of the function return a value explicitly.
While at it, make the docstring of check_dmesg_clean clearer by explaining the return values.
--- tools/testing/selftests/net/cork_fragsize.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
tools/testing/selftests/net/cork_fragsize.py +3 -2
@@ -54,7 +54,7 @@ def check_kernel_config(option: str) -> bool | None: return False except OSError: continue - return None + return None def assert_debug_kernel() -> None:
@@ -71,7 +71,8 @@ def assert_debug_kernel() -> None: def check_dmesg_clean(func: str) -> bool: ''' - Check if the given function produced a WARN in dmesg. + Check if the given function produced a WARN in dmesg. Returns True if dmesg + is clean, i.e. doesn't contain traces of a WARNING in the given function. ''' with subprocess.Popen(['dmesg'], stdout=subprocess.PIPE) as dmesg:
Signature · 1 line
2.55.0
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 9 lines · On Thu, 1 Oct 2026 15:42:01 +0300 you wrote:
From: Alice Mikityanska <[email protected]>
return None is unreachable in
check_kernel_config, because the try block always returns a True or False value, and the except block continues the loop. The return None was supposed to be outside the for loop, to make pylint happy by making all the flows of the function return a value explicitly.[...]
Here is the summary with links:
- [net-next] selftests: net: Fix minor issues in cork_fragsize.py
https://git.kernel.org/netdev/net-next/c/363cf8def362
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html