Lines Matching full:expected

172 def bpftool_prog_list(expected=None, ns=""):  argument
178 if expected is not None:
179 if len(progs) != expected:
180 fail(True, "%d BPF programs loaded, expected %d" %
181 (len(progs), expected))
184 def bpftool_map_list(expected=None, ns=""): argument
188 if expected is not None:
189 if len(maps) != expected:
190 fail(True, "%d BPF maps loaded, expected %d" %
191 (len(maps), expected))
194 def bpftool_prog_list_wait(expected=0, n_retry=20): argument
197 if nprogs == expected:
200 …raise Exception("Time out waiting for program counts to stabilize want %d, have %d" % (expected, n…
202 def bpftool_map_list_wait(expected=0, n_retry=20): argument
205 if nmaps == expected:
208 …raise Exception("Time out waiting for map counts to stabilize want %d, have %d" % (expected, nmaps…
407 def dfs_get_bound_progs(self, expected): argument
409 if expected is not None:
410 if len(progs) != expected:
411 fail(True, "%d BPF programs bound, expected %d" %
412 (len(progs), expected))
435 raise Exception("netdevice name mismatches the expected one")
498 "XDP program not reporting in iplink (reported %s, expected %s)" %
513 def tc_show_ingress(self, expected=None): argument
538 if expected is not None:
539 fail(len(filters) != expected,
540 "%d ingress filters loaded, expected %d" %
541 (len(filters), expected))
598 progs = bpftool_prog_list(expected=(idx + 1))
605 def pin_map(file_name, idx=0, expected=1): argument
606 maps = bpftool_map_list(expected=expected)
614 bpftool_prog_list(expected=0)
618 "Showing prog with removed device expected ENODEV, error is %s" %
621 bpftool_map_list(expected=0)
625 "Showing map with removed device expected ENODEV, error is %s" %
629 progs = bpftool_prog_list(expected=1, ns=ns)
645 maps = bpftool_map_list(expected=2, ns=ns)
814 bpftool_prog_list_wait(expected=0)
827 simdev.dfs_get_bound_progs(expected=0)
844 simdev.dfs_get_bound_progs(expected=0)
845 ingress = sim.tc_show_ingress(expected=1)
854 simdev.dfs_get_bound_progs(expected=0)
855 ingress = sim.tc_show_ingress(expected=1)
929 dfs = simdev.dfs_get_bound_progs(expected=1)
930 progs = bpftool_prog_list(expected=1)
931 ingress = sim.tc_show_ingress(expected=1)
954 sim.tc_show_ingress(expected=0)
966 bpftool_prog_list_wait(expected=0)
975 bpftool_prog_list_wait(expected=0)
984 progs = bpftool_prog_list(expected=1)
996 bpftool_prog_list_wait(expected=1)
998 progs = bpftool_prog_list(expected=1)
1017 bpftool_prog_list_wait(expected=0)
1057 progs = bpftool_prog_list(expected=1)
1062 dfs = simdev.dfs_get_bound_progs(expected=1)
1078 bpftool_prog_list_wait(expected=0)
1096 bpftool_prog_list_wait(expected=0)
1163 fail(time_diff < delay_sec, "Removal process took %s, expected %s" %
1168 bpftool_prog_list_wait(expected=0)
1192 map_file, _ = pin_map("/sys/fs/bpf/tmp_map", idx=1, expected=2)
1200 bpftool_prog_list_wait(expected=0)
1207 maps = bpftool_map_list(expected=2)
1233 "expected ENOENT, error is '%s'" % (err["error"]))
1243 "expected EEXIST, error is '%s'" % (err["error"]))
1250 fail(key != i, "expected key %d, got %d" % (key, i))
1252 fail(val != i * 3, "expected value %d, got %d" % (val, i * 3))
1258 fail(key != 0, "next key %d, expected %d" % (key, 0))
1262 fail(key != 1, "next key %d, expected %d" % (key, 1))
1267 "expected ENOENT, error is '%s'" % (err["error"]))
1279 "expected ENOENT, error is '%s'" % (err["error"]))
1283 bpftool_map_list_wait(expected=0)
1290 bpftool_map_list_wait(expected=0)
1371 bpftool_prog_list_wait(expected=2)
1374 bpftool_prog_list_wait(expected=1)
1379 bpftool_prog_list_wait(expected=1)
1392 bpftool_prog_list_wait(expected=0)