summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/net/lib/py/ksft.py
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2024-08-10 08:37:28 +0300
committerDavid S. Miller <davem@davemloft.net>2024-08-12 16:16:25 +0300
commitc1ad8ef804e40fc1ef3cb008e0113d76f4acc1a0 (patch)
tree4ecd07d7b69da47653d4bc691a45cf3a9fee56ab /tools/testing/selftests/net/lib/py/ksft.py
parent8ad3be135212a99fe16961de0e6d7d0ddd8268a2 (diff)
downloadlinux-c1ad8ef804e40fc1ef3cb008e0113d76f4acc1a0.tar.xz
selftests: drv-net: rss_ctx: test dumping RSS contexts
Add a test for dumping RSS contexts. Make sure indir table and key are sane when contexts are created with various combination of inputs. Test the dump filtering by ifname and start-context. Reviewed-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Edward Cree <ecree.xilinx@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing/selftests/net/lib/py/ksft.py')
-rw-r--r--tools/testing/selftests/net/lib/py/ksft.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/testing/selftests/net/lib/py/ksft.py b/tools/testing/selftests/net/lib/py/ksft.py
index f663e0daec0d..477ae76de93d 100644
--- a/tools/testing/selftests/net/lib/py/ksft.py
+++ b/tools/testing/selftests/net/lib/py/ksft.py
@@ -55,6 +55,12 @@ def ksft_eq(a, b, comment=""):
_fail("Check failed", a, "!=", b, comment)
+def ksft_ne(a, b, comment=""):
+ global KSFT_RESULT
+ if a == b:
+ _fail("Check failed", a, "==", b, comment)
+
+
def ksft_true(a, comment=""):
if not a:
_fail("Check failed", a, "does not eval to True", comment)