summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/net/lib/py/ynl.py
diff options
context:
space:
mode:
authorYuyang Huang <yuyanghuang@google.com>2025-02-07 14:08:36 +0300
committerPaolo Abeni <pabeni@redhat.com>2025-02-11 13:26:53 +0300
commit4f280376e5318f17f7388999f9a0098ccaae931d (patch)
treec81a6634bba4b45f48d9981d2c8ec7fba792c5f4 /tools/testing/selftests/net/lib/py/ynl.py
parenteb4e17a1d915d3c550e5a58c4bf370659dbe0dc8 (diff)
downloadlinux-4f280376e5318f17f7388999f9a0098ccaae931d.tar.xz
selftests/net: Add selftest for IPv4 RTM_GETMULTICAST support
This change introduces a new selftest case to verify the functionality of dumping IPv4 multicast addresses using the RTM_GETMULTICAST netlink message. The test utilizes the ynl library to interact with the netlink interface and validate that the kernel correctly reports the joined IPv4 multicast addresses. To run the test, execute the following command: $ vng -v --user root --cpus 16 -- \ make -C tools/testing/selftests TARGETS=net \ TEST_PROGS=rtnetlink.py TEST_GEN_PROGS="" run_tests Cc: Maciej Żenczykowski <maze@google.com> Cc: Lorenzo Colitti <lorenzo@google.com> Signed-off-by: Yuyang Huang <yuyanghuang@google.com> Link: https://patch.msgid.link/20250207110836.2407224-2-yuyanghuang@google.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'tools/testing/selftests/net/lib/py/ynl.py')
-rw-r--r--tools/testing/selftests/net/lib/py/ynl.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/testing/selftests/net/lib/py/ynl.py b/tools/testing/selftests/net/lib/py/ynl.py
index ad1e36baee2a..8986c584cb37 100644
--- a/tools/testing/selftests/net/lib/py/ynl.py
+++ b/tools/testing/selftests/net/lib/py/ynl.py
@@ -42,6 +42,10 @@ class RtnlFamily(YnlFamily):
super().__init__((SPEC_PATH / Path('rt_link.yaml')).as_posix(),
schema='', recv_size=recv_size)
+class RtnlAddrFamily(YnlFamily):
+ def __init__(self, recv_size=0):
+ super().__init__((SPEC_PATH / Path('rt_addr.yaml')).as_posix(),
+ schema='', recv_size=recv_size)
class NetdevFamily(YnlFamily):
def __init__(self, recv_size=0):