@@ -207,9 +207,11 @@ def bpftool_prog_list_wait(expected=0, n_retry=20):
207207 raise Exception ("Time out waiting for program counts to stabilize want %d, have %d" % (expected , nprogs ))
208208
209209def bpftool_map_list_wait (expected = 0 , n_retry = 20 , ns = "" ):
210+ nmaps = None
210211 for i in range (n_retry ):
211212 maps = bpftool_map_list (ns = ns )
212- if len (maps ) == expected :
213+ nmaps = len (maps )
214+ if nmaps == expected :
213215 return maps
214216 time .sleep (0.05 )
215217 raise Exception ("Time out waiting for map counts to stabilize want %d, have %d" % (expected , nmaps ))
@@ -594,8 +596,9 @@ def check_extack_nsim(output, reference, args):
594596 check_extack (output , "netdevsim: " + reference , args )
595597
596598def check_no_extack (res , needle ):
597- fail ((res [1 ] + res [2 ]).count (needle ) or (res [1 ] + res [2 ]).count ("Warning:" ),
598- "Found '%s' in command output, leaky extack?" % (needle ))
599+ haystack = (res [1 ] + res [2 ]).strip ()
600+ fail (haystack .count (needle ) or haystack .count ("Warning:" ),
601+ "Unexpected command output, leaky extack? ('%s', '%s')" % (needle , haystack ))
599602
600603def check_verifier_log (output , reference ):
601604 lines = output .split ("\n " )
@@ -707,6 +710,7 @@ def test_multi_prog(simdev, sim, obj, modename, modeid):
707710base_map_names = [
708711 'pid_iter.rodata' , # created on each bpftool invocation
709712 'libbpf_det_bind' , # created on each bpftool invocation
713+ 'libbpf_global' ,
710714]
711715
712716# Check netdevsim
0 commit comments