Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix freezing of 'test_brb' if iperf is not found
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 a47c44f so add @Mayfail in test_brb Signed-off-by: Liu Chao <[email protected]>
- Loading branch information