From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9A997A00BE; Fri, 11 Feb 2022 06:42:44 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7969641141; Fri, 11 Feb 2022 06:42:44 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id BD6AF410E5 for ; Fri, 11 Feb 2022 06:42:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644558163; x=1676094163; h=from:to:cc:subject:date:message-id; bh=+iqtDMJAoMm2RofQ2m2/GG1ssPPHFH45VL17pVddje4=; b=kqq/oW/G+iZN8NWWtDiBiOA7NDT40ptAo5FsAyAxgQzB2A17yvCC++UH Ud/AUaUbZ5kEKKl9CUcShZR5q2uRp/4K28tDO0BcRIHbmPVPi5wVZa0nX +CjINmK38S9ewldxqhcrM59j6YkVP6h+QhQ4Z6GbygxbiKNthlzx/3adz /Wv7nq8IYBb2K1TOLND/g8yfy+B18jh3hf1W4YucycorBwUAiexYz3DFI FTUTDaED0N/PxEUtIg2W8SvLuXKWFqGR9WztBRWGtMveASuRwvde4DTaP WZ7AcXxk+RngPhjU1N2/nTGt4r+zLuOVOVQwfHLF5NrhTFeNok2LqgMur w==; X-IronPort-AV: E=McAfee;i="6200,9189,10254"; a="274221491" X-IronPort-AV: E=Sophos;i="5.88,359,1635231600"; d="scan'208";a="274221491" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Feb 2022 21:42:41 -0800 X-IronPort-AV: E=Sophos;i="5.88,359,1635231600"; d="scan'208";a="541952902" Received: from unknown (HELO localhost.localdomain) ([10.239.251.93]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Feb 2022 21:42:40 -0800 From: Zhimin Huang To: dts@dpdk.org, xueqin.lin@intel.com Cc: Zhimin Huang Subject: [dts] [PATCH V2 1/3] test_plans/asan_smoke_test_plan:add ASan smoke testplan Date: Fri, 11 Feb 2022 22:09:18 +0800 Message-Id: <20220211140920.29929-1-zhiminx.huang@intel.com> X-Mailer: git-send-email 2.17.1 X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org add ASan test plan. Signed-off-by: Zhimin Huang --- 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..b9e69400 --- /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` + - It finds use-after-free, various kinds of buffer overruns in dpdk, and print 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: 82599/X710/XXV710/XL710/E810,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