Skip to content

Commit 0518863

Browse files
committed
selftests: net: support setting recv_size in YNL
recv_size parameter allows constraining the buffer size for dumps. It's useful in testing kernel handling of dump continuation, IOW testing dumps which span multiple skbs. Let the tests set this parameter when initializing the YNL family. Keep the normal default, we don't want tests to unintentionally behave very differently than normal code. Reviewed-by: Joe Damato <[email protected]> Reviewed-by: Petr Machata <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent ecc391a commit 0518863

File tree

1 file changed

+8
-8
lines changed
  • tools/testing/selftests/net/lib/py

1 file changed

+8
-8
lines changed

tools/testing/selftests/net/lib/py/ynl.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,23 +32,23 @@
3232
# Set schema='' to avoid jsonschema validation, it's slow
3333
#
3434
class EthtoolFamily(YnlFamily):
35-
def __init__(self):
35+
def __init__(self, recv_size=0):
3636
super().__init__((SPEC_PATH / Path('ethtool.yaml')).as_posix(),
37-
schema='')
37+
schema='', recv_size=recv_size)
3838

3939

4040
class RtnlFamily(YnlFamily):
41-
def __init__(self):
41+
def __init__(self, recv_size=0):
4242
super().__init__((SPEC_PATH / Path('rt_link.yaml')).as_posix(),
43-
schema='')
43+
schema='', recv_size=recv_size)
4444

4545

4646
class NetdevFamily(YnlFamily):
47-
def __init__(self):
47+
def __init__(self, recv_size=0):
4848
super().__init__((SPEC_PATH / Path('netdev.yaml')).as_posix(),
49-
schema='')
49+
schema='', recv_size=recv_size)
5050

5151
class NetshaperFamily(YnlFamily):
52-
def __init__(self):
52+
def __init__(self, recv_size=0):
5353
super().__init__((SPEC_PATH / Path('net_shaper.yaml')).as_posix(),
54-
schema='')
54+
schema='', recv_size=recv_size)

0 commit comments

Comments
 (0)