Lines Matching full:expected
165 def bpftool_prog_list(expected=None, ns=""): argument
171 if expected is not None:
172 if len(progs) != expected:
173 fail(True, "%d BPF programs loaded, expected %d" %
174 (len(progs), expected))
177 def bpftool_map_list(expected=None, ns=""): argument
183 if expected is not None:
184 if len(maps) != expected:
185 fail(True, "%d BPF maps loaded, expected %d" %
186 (len(maps), expected))
189 def bpftool_prog_list_wait(expected=0, n_retry=20): argument
192 if nprogs == expected:
195 …raise Exception("Time out waiting for program counts to stabilize want %d, have %d" % (expected, n…
197 def bpftool_map_list_wait(expected=0, n_retry=20): argument
200 if nmaps == expected:
203 …raise Exception("Time out waiting for map counts to stabilize want %d, have %d" % (expected, nmaps…
372 def dfs_get_bound_progs(self, expected): argument
374 if expected is not None:
375 if len(progs) != expected:
376 fail(True, "%d BPF programs bound, expected %d" %
377 (len(progs), expected))
419 "XDP program not reporting in iplink (reported %s, expected %s)" %
434 def tc_show_ingress(self, expected=None): argument
459 if expected is not None:
460 fail(len(filters) != expected,
461 "%d ingress filters loaded, expected %d" %
462 (len(filters), expected))
519 progs = bpftool_prog_list(expected=(idx + 1))
526 def pin_map(file_name, idx=0, expected=1): argument
527 maps = bpftool_map_list(expected=expected)
535 bpftool_prog_list(expected=0)
539 "Showing prog with removed device expected ENODEV, error is %s" %
542 bpftool_map_list(expected=0)
546 "Showing map with removed device expected ENODEV, error is %s" %
550 progs = bpftool_prog_list(expected=1, ns=ns)
566 maps = bpftool_map_list(expected=2, ns=ns)
662 bpftool_prog_list_wait(expected=0)
674 sim.dfs_get_bound_progs(expected=0)
691 sim.dfs_get_bound_progs(expected=0)
692 ingress = sim.tc_show_ingress(expected=1)
701 sim.dfs_get_bound_progs(expected=0)
702 ingress = sim.tc_show_ingress(expected=1)
769 dfs = sim.dfs_get_bound_progs(expected=1)
770 progs = bpftool_prog_list(expected=1)
771 ingress = sim.tc_show_ingress(expected=1)
793 sim.tc_show_ingress(expected=0)
805 bpftool_prog_list_wait(expected=0)
813 bpftool_prog_list_wait(expected=0)
821 progs = bpftool_prog_list(expected=1)
833 bpftool_prog_list_wait(expected=1)
835 progs = bpftool_prog_list(expected=1)
862 bpftool_prog_list_wait(expected=0)
893 progs = bpftool_prog_list(expected=1)
899 dfs = sim.dfs_get_bound_progs(expected=1)
915 bpftool_prog_list_wait(expected=0)
932 bpftool_prog_list_wait(expected=0)
1049 fail(time_diff < delay_sec, "Removal process took %s, expected %s" %
1054 bpftool_prog_list_wait(expected=0)
1077 map_file, _ = pin_map("/sys/fs/bpf/tmp_map", idx=1, expected=2)
1085 bpftool_prog_list_wait(expected=0)
1091 maps = bpftool_map_list(expected=2)
1117 "expected ENOENT, error is '%s'" % (err["error"]))
1127 "expected EEXIST, error is '%s'" % (err["error"]))
1134 fail(key != i, "expected key %d, got %d" % (key, i))
1136 fail(val != i * 3, "expected value %d, got %d" % (val, i * 3))
1142 fail(key != 0, "next key %d, expected %d" % (key, 0))
1146 fail(key != 1, "next key %d, expected %d" % (key, 1))
1151 "expected ENOENT, error is '%s'" % (err["error"]))
1163 "expected ENOENT, error is '%s'" % (err["error"]))
1167 bpftool_map_list_wait(expected=0)
1173 bpftool_map_list_wait(expected=0)
1253 bpftool_prog_list_wait(expected=2)
1256 bpftool_prog_list_wait(expected=1)
1261 bpftool_prog_list_wait(expected=1)
1273 bpftool_prog_list_wait(expected=0)