[dts] [PATCH V1 2/2] tests/shutdown_api:add asan test case
Zhimin Huang
zhiminx.huang at intel.com
Wed Jan 5 20:45:16 CET 2022
add asan build test case.
Signed-off-by: Zhimin Huang <zhiminx.huang at intel.com>
---
tests/TestSuite_shutdown_api.py | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/tests/TestSuite_shutdown_api.py b/tests/TestSuite_shutdown_api.py
index 9f40d232..50f40330 100644
--- a/tests/TestSuite_shutdown_api.py
+++ b/tests/TestSuite_shutdown_api.py
@@ -798,6 +798,17 @@ class TestShutdownApi(TestCase):
"Bad arguments" not in out and "Invalid queueid" not in out,
"TX descriptor status is not supported")
+ def test_asan_build_test(self):
+ self.dut.build_install_dpdk(target=self.target, extra_options="-Dbuildtype=debug -Db_lundef=false -Db_sanitize=address")
+ self.pmdout.start_testpmd(param="--portmask={} --port-topology=loop".format(utils.create_mask(self.ports)))
+ cmd = "ps -aux | grep testpmd | grep -v grep"
+ out = self.dut.send_expect(cmd, "#", 15, alt_session=True)
+ if "testpmd" not in out:
+ self.verify("After build dpdk with ASan, start testpmd failed")
+ self.pmdout.execute_cmd("set fwd mac")
+ self.pmdout.execute_cmd("start")
+ self.check_forwarding()
+
def tear_down(self):
"""
Run after each test case.
@@ -805,6 +816,8 @@ class TestShutdownApi(TestCase):
if self._suite_result.test_case == "test_change_linkspeed_vf":
self.destroy_vm_env()
self.dut.kill_all()
+ if self.running_case == 'test_asan_build_test':
+ self.dut.build_install_dpdk(self.target)
self.pmdout.start_testpmd("Default", "--portmask=%s --port-topology=loop" % utils.create_mask(self.ports),
socket=self.ports_socket)
ports_num = len(self.ports)
--
2.17.1
More information about the dts
mailing list