Lines Matching full:dump
13 # cover ops with a do, with a dump, and with both.
35 [{'family-id': 16, 'op-policy': {'do': 0, 'dump': 0, 'op-id': 3}},
36 {'family-id': 16, 'op-policy': {'dump': 1, 'op-id': 4}}, ...]
40 {3:{'do','dump'}, 4:{'dump'}}
45 for msg in ctrl.getpolicy(req, dump=True):
64 ksft_true(op['flags'] & {'cmd-cap-do', 'cmd-cap-dump'},
67 # nlctrl getfamily (id 3) does both, getpolicy (id 10) is dump-only
69 ksft_in('cmd-cap-dump', ops['nlctrl'][3]['flags'])
71 ksft_in('cmd-cap-dump', ops['nlctrl'][10]['flags'])
75 # dev-get (id 1) should support both do and dump
77 ksft_in('cmd-cap-dump', netdev[1]['flags'])
79 # qstats-get (id 12) is dump-only
81 ksft_in('cmd-cap-dump', netdev[12]['flags'])
85 ksft_not_in('cmd-cap-dump', netdev[14]['flags'])
89 # not appear in the ops list since they have no do/dump handlers.
96 """Dump all families and verify expected entries."""
97 families = ctrl.getfamily({}, dump=True)
101 ksft_in('nlctrl', names, comment="nlctrl not found in family dump")
102 ksft_in('netdev', names, comment="netdev not found in family dump")
106 """Dump policies for ops using get_policy() and validate results.
108 Test with netdev (split ops) where do and dump can have different
114 # dev-get: do has a real policy with ifindex, dump has no policy
120 pol_dump = ndev.get_policy('dev-get', 'dump')
123 # napi-get: both do and dump have real policies
127 pol_dump = ndev.get_policy('napi-get', 'dump')
133 # strset-get (has both do and dump, full ops share policy)
137 pol_dump = et.get_policy('strset-get', 'dump')
138 ksft_ge(len(pol_dump), 1, comment="strset-get should have a dump policy")
143 # linkinfo-set is do-only (SET command), no dump
147 pol_dump = et.get_policy('linkinfo-set', 'dump')
149 comment="linkinfo-set should not have a dump policy")
155 real ops that exist, have given modes (do vs dump) and have 'haspol'.
176 if 'dump' in modes:
177 ksft_in('cmd-cap-dump', ops_by_id[cmd]['flags'],
178 comment=f"{name} cmd {cmd} has no dump")
181 # the kernel, it has to report what the full dump did.
184 comment=f"{name} cmd {cmd} policy differs from the dump")