test suite reviews and discussions
 help / color / mirror / Atom feed
From: Zhimin Huang <zhiminx.huang@intel.com>
To: dts@dpdk.org
Cc: Zhimin Huang <zhiminx.huang@intel.com>
Subject: [dts] [PATCH V1 1/3] test_plans/asan_smoke_test_plan:add asan smoke test plan
Date: Fri, 11 Feb 2022 20:56:57 +0800	[thread overview]
Message-ID: <20220211125659.27350-1-zhiminx.huang@intel.com> (raw)

add asan smoke test plan.

Signed-off-by: Zhimin Huang <zhiminx.huang@intel.com>
---
 test_plans/asan_smoke_test_plan.rst | 74 +++++++++++++++++++++++++++++
 1 file changed, 74 insertions(+)
 create mode 100644 test_plans/asan_smoke_test_plan.rst

diff --git a/test_plans/asan_smoke_test_plan.rst b/test_plans/asan_smoke_test_plan.rst
new file mode 100644
index 00000000..e7d05a19
--- /dev/null
+++ b/test_plans/asan_smoke_test_plan.rst
@@ -0,0 +1,74 @@
+.. Copyright (c) <2022>, Intel Corporation
+   All rights reserved.
+
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions
+   are met:
+
+   - Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+
+   - Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in
+     the documentation and/or other materials provided with the
+     distribution.
+
+   - Neither the name of Intel Corporation nor the names of its
+     contributors may be used to endorse or promote products derived
+     from this software without specific prior written permission.
+
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+   COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+   INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+   SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+   STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+   OF THE POSSIBILITY OF SUCH DAMAGE.
+
+===========================
+AddressSanitizer Smoke Test
+===========================
+
+Description
+===========
+
+AddressSanitizer (ASan) is a fast memory error detector,it is a widely-used debugging tool to detect memory access errors.
+
+   - `AddressSanitizer<https://github.com/google/sanitizers/wiki/AddressSanitizer>`
+   - It finds use-after-free, various kinds of buffer overruns in dpdk, and printing out detailed debug information
+      whenever an error is detected.
+   - ASAN is integrated with gcc and clang, and use meson option '-Db_sanitize=address' to enable.
+
+Prerequisites
+=============
+
+1. NIC requires:
+
+   - Intel ethernet cards: niantic/fortville/columbiaville,etc
+
+2. Software::
+
+      dpdk: http://dpdk.org/git/dpdk.
+      scapy: http://www.secdev.org/projects/scapy/
+
+Test Case: RX/TX test with ASan enable
+======================================
+
+1. Build dpdk with ASan tool, add "-Dbuildtype=debug -Db_lundef=false -Db_sanitize=address"
+   in meson build system could enable ASan tool, such as below::
+
+      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. Bind NIC port to vfio-pci.
+
+3. Setup testpmd, check testpmd could launch successfully and don't have "heap-buffer-overflow", "use-after-free" memory errors.
+
+4. Set mac forward mode.
+
+5. Send packet and check testpmd forward packet successfully.
\ No newline at end of file
-- 
2.17.1


             reply	other threads:[~2022-02-11  4:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-11 12:56 Zhimin Huang [this message]
2022-02-11 12:56 ` [dts] [PATCH V1 2/3] test_plans/index:add new suite Zhimin Huang
2022-02-11 12:56 ` [dts] [PATCH V1 3/3] tests/asan_smoke:add asan smoke test suite Zhimin Huang
2022-02-11  6:54   ` Lin, Xueqin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220211125659.27350-1-zhiminx.huang@intel.com \
    --to=zhiminx.huang@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).