summaryrefslogtreecommitdiff
path: root/tools/testing
diff options
context:
space:
mode:
authorAlice Mikityanska <alice@isovalent.com>2026-10-01 15:42:01 +0300
committerJakub Kicinski <kuba@kernel.org>2026-10-05 17:15:54 -0700
commit363cf8def36201fa6bbca6b2b9f87b32340eba01 (patch)
treebe86f3175e200fe92c0b49b132ead126a50af459 /tools/testing
parent9b84b36a527ccc831389628058a5bb1fcad66008 (diff)
downloadlinux-next-363cf8def36201fa6bbca6b2b9f87b32340eba01.tar.gz
linux-next-363cf8def36201fa6bbca6b2b9f87b32340eba01.zip
selftests: net: Fix minor issues in cork_fragsize.py
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. Reported-by: Sashiko <sashiko-bot@kernel.org> Closes: https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260901195714.673548-1-alice.kernel%40fastmail.im Signed-off-by: Alice Mikityanska <alice@isovalent.com> Link: https://patch.msgid.link/20261001124201.584805-1-alice.kernel@fastmail.im Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/testing')
-rwxr-xr-xtools/testing/selftests/net/cork_fragsize.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/testing/selftests/net/cork_fragsize.py b/tools/testing/selftests/net/cork_fragsize.py
index 7afd643d07ec..ae6be804b7a2 100755
--- a/tools/testing/selftests/net/cork_fragsize.py
+++ b/tools/testing/selftests/net/cork_fragsize.py
@@ -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: