test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1 1/2] test_plans/shutdown_api_test_plan:add case in plan
@ 2022-01-05 19:45 Zhimin Huang
  2022-01-05 19:45 ` [dts] [PATCH V1 2/2] tests/shutdown_api:add asan test case Zhimin Huang
  2022-01-06  2:36 ` [dts] [PATCH V1 1/2] test_plans/shutdown_api_test_plan:add case in plan Lin, Xueqin
  0 siblings, 2 replies; 5+ messages in thread
From: Zhimin Huang @ 2022-01-05 19:45 UTC (permalink / raw)
  To: dts, xueqin.lin; +Cc: Zhimin Huang

add asan build test case in plan.

Signed-off-by: Zhimin Huang <zhiminx.huang@intel.com>
---
 test_plans/shutdown_api_test_plan.rst | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/test_plans/shutdown_api_test_plan.rst b/test_plans/shutdown_api_test_plan.rst
index f92b08f2..450d7f56 100644
--- a/test_plans/shutdown_api_test_plan.rst
+++ b/test_plans/shutdown_api_test_plan.rst
@@ -254,3 +254,18 @@ Test Case: RX/TX descriptor status
 3. Check rx descriptor status can be ``AVAILABLE``, ``DONE`` or ``UNAVAILABLE``.
 4. Run ``show port 0 txq * desc * status`` to check tx descriptor status.
 5. Check tx descriptor status can be ``FULL``, ``DONE`` or ``UNAVAILABLE``.
+
+Test Case: RX/TX test with ASan enable
+--------------------------------------
+
+1. `AddressSanitizer<https://github.com/google/sanitizers/wiki/AddressSanitizer>`
+
+(ASan) is a widely-used debugging tool to detect memory access errors.
+Add "-Dbuildtype=debug -Db_lundef=false -Db_sanitize=address" in meson build system to enable ASan tool::
+
+   CC=gcc meson -Denable_kmods=True -Dlibdir=lib -Dbuildtype=debug -Db_lundef=false -Db_sanitize=address --default-library=static x86_64-native-linuxapp-gcc
+   ninja -C x86_64-native-linuxapp-gcc -j 70
+
+2. Launch testpmd and check testpmd status
+3. Send packet and check testpmd forward packet successfully
+
-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dts] [PATCH V1 2/2] tests/shutdown_api:add asan test case
  2022-01-05 19:45 [dts] [PATCH V1 1/2] test_plans/shutdown_api_test_plan:add case in plan Zhimin Huang
@ 2022-01-05 19:45 ` Zhimin Huang
  2022-01-06  1:18   ` Huang, ZhiminX
  2022-01-06  2:34   ` Lin, Xueqin
  2022-01-06  2:36 ` [dts] [PATCH V1 1/2] test_plans/shutdown_api_test_plan:add case in plan Lin, Xueqin
  1 sibling, 2 replies; 5+ messages in thread
From: Zhimin Huang @ 2022-01-05 19:45 UTC (permalink / raw)
  To: dts, xueqin.lin; +Cc: Zhimin Huang

add asan build test case.

Signed-off-by: Zhimin Huang <zhiminx.huang@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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [dts] [PATCH V1 2/2] tests/shutdown_api:add asan test case
  2022-01-05 19:45 ` [dts] [PATCH V1 2/2] tests/shutdown_api:add asan test case Zhimin Huang
@ 2022-01-06  1:18   ` Huang, ZhiminX
  2022-01-06  2:34   ` Lin, Xueqin
  1 sibling, 0 replies; 5+ messages in thread
From: Huang, ZhiminX @ 2022-01-06  1:18 UTC (permalink / raw)
  To: dts, Lin, Xueqin

[-- Attachment #1: Type: text/plain, Size: 391 bytes --]

> -----Original Message-----
> From: Huang, ZhiminX <zhiminx.huang@intel.com>
> Sent: Thursday, January 6, 2022 3:45 AM
> To: dts@dpdk.org; Lin, Xueqin <xueqin.lin@intel.com>
> Cc: Huang, ZhiminX <zhiminx.huang@intel.com>
> Subject: [dts] [PATCH V1 2/2] tests/shutdown_api:add asan test case
> 
> add asan build test case.
> 
Tested-by: Zhimin Huang <zhiminx.huang@intel.com >



[-- Attachment #2: TestShutdownApi.log --]
[-- Type: application/octet-stream, Size: 545632 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [dts] [PATCH V1 2/2] tests/shutdown_api:add asan test case
  2022-01-05 19:45 ` [dts] [PATCH V1 2/2] tests/shutdown_api:add asan test case Zhimin Huang
  2022-01-06  1:18   ` Huang, ZhiminX
@ 2022-01-06  2:34   ` Lin, Xueqin
  1 sibling, 0 replies; 5+ messages in thread
From: Lin, Xueqin @ 2022-01-06  2:34 UTC (permalink / raw)
  To: Huang, ZhiminX, dts


> -----Original Message-----
> From: Huang, ZhiminX <zhiminx.huang@intel.com>
> Sent: Thursday, January 6, 2022 3:45 AM
> To: dts@dpdk.org; Lin, Xueqin <xueqin.lin@intel.com>
> Cc: Huang, ZhiminX <zhiminx.huang@intel.com>
> Subject: [dts] [PATCH V1 2/2] tests/shutdown_api:add asan test case
> 
> add asan build test case.
> 
> Signed-off-by: Zhimin Huang <zhiminx.huang@intel.com>
Acked-by: Xueqin Lin <xueqin.lin@intel.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [dts] [PATCH V1 1/2] test_plans/shutdown_api_test_plan:add case in plan
  2022-01-05 19:45 [dts] [PATCH V1 1/2] test_plans/shutdown_api_test_plan:add case in plan Zhimin Huang
  2022-01-05 19:45 ` [dts] [PATCH V1 2/2] tests/shutdown_api:add asan test case Zhimin Huang
@ 2022-01-06  2:36 ` Lin, Xueqin
  1 sibling, 0 replies; 5+ messages in thread
From: Lin, Xueqin @ 2022-01-06  2:36 UTC (permalink / raw)
  To: Huang, ZhiminX, dts


> -----Original Message-----
> From: Huang, ZhiminX <zhiminx.huang@intel.com>
> Sent: Thursday, January 6, 2022 3:45 AM
> To: dts@dpdk.org; Lin, Xueqin <xueqin.lin@intel.com>
> Cc: Huang, ZhiminX <zhiminx.huang@intel.com>
> Subject: [dts] [PATCH V1 1/2] test_plans/shutdown_api_test_plan:add case
> in plan
> 
> add asan build test case in plan.
> 
> Signed-off-by: Zhimin Huang <zhiminx.huang@intel.com>
Acked-by: Xueqin Lin <xueqin.lin@intel.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-01-06  2:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-05 19:45 [dts] [PATCH V1 1/2] test_plans/shutdown_api_test_plan:add case in plan Zhimin Huang
2022-01-05 19:45 ` [dts] [PATCH V1 2/2] tests/shutdown_api:add asan test case Zhimin Huang
2022-01-06  1:18   ` Huang, ZhiminX
2022-01-06  2:34   ` Lin, Xueqin
2022-01-06  2:36 ` [dts] [PATCH V1 1/2] test_plans/shutdown_api_test_plan:add case in plan Lin, Xueqin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).