If iperf is not installed or installed at a location that is not
in PATH as recgnized by Python, then 'test_brb' will fail while
test_brb2 success.
test_brb:
======================================================================
ERROR: test_brb (__main__.TestBPFSocket)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_brb.py", line 200, in test_brb
nsp_server = NSPopenWithCheck(ns2_ipdb.nl.netns, ["iperf", "-s", "-xSC"])
File "/root/rpmbuild/BUILD/bcc/tests/python/utils.py", line 63, in __init__
has_executable(name)
File "/root/rpmbuild/BUILD/bcc/tests/python/utils.py", line 18, in has_executable
raise Exception(name + ": command not found")
Exception: iperf: command not found
----------------------------------------------------------------------
Ran 1 test in 2.546s
FAILED (errors=1)
test_brb2:
CRITICAL:root:WARNING! Test test_brb (__main__.TestBPFSocket) failed, but marked as passed because it is decorated with @mayFail.
CRITICAL:root: The reason why this mayFail was: This fails on github actions environment, and needs to be fixed
CRITICAL:root: The failure was: "iperf: command not found"
CRITICAL:root: Stacktrace: "Traceback (most recent call last):
File "/root/rpmbuild/BUILD/bcc/tests/python/utils.py", line 35, in wrapper
res = func(*args, **kwargs)
File "test_brb.py", line 202, in test_brb
nsp_server = NSPopenWithCheck(ns2_ipdb.nl.netns, ["iperf", "-s", "-xSC"])
File "/root/rpmbuild/BUILD/bcc/tests/python/utils.py", line 63, in __init__
has_executable(name)
File "/root/rpmbuild/BUILD/bcc/tests/python/utils.py", line 18, in has_executable
raise Exception(name + ": command not found")
Exception: iperf: command not found
"
.
----------------------------------------------------------------------
Ran 1 test in 2.627s
OK
test_brb2 success because there is @mayFail in it which come from
commit
a47c44fa0d570b64d8cb06449052db4f363e80a4
so add @mayFail in test_brb
Signed-off-by: Liu Chao <liuchao173@huawei.com>