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 388E7A04A9; Tue, 25 Jan 2022 09:38:45 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2ED8D4284E; Tue, 25 Jan 2022 09:38:45 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 220264013F for ; Tue, 25 Jan 2022 09:38: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=1643099923; x=1674635923; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ReO4s4TAfh8W6KPM+VAf2LHCKdSOlQbWV+/YHgH4Sd4=; b=NbqfUsTUX7Gf5uOVX6HVj6Z8QgdeerWC9asFqcDe5a0pkAMUglRZTeWn rh20wTMgtvnOlxjEY3OxZMSTNTNrk3ROmGQpbHxKQlBphFCkEScCMq1DF 9R6KYdAB78jxP8d/pJub/QLeSSTmM4b20com5v0tGvUhuZTAQzgLMVawj igvQe+1mM/IqY9WrrA1wA8je6qCET0DlzjU3GLbHjDQGMr6W9YqRHH3Xc A/8P4A8VpRoveVZVlGzNIcdjFRYQEjots1cOHvS6vq004J342wRnF9hpm NbeInXviyeA9Sud/E5/kYC2q8yxY/jpUHdkWhq/845Cxov5Z6CpISVKTC A==; X-IronPort-AV: E=McAfee;i="6200,9189,10237"; a="226232164" X-IronPort-AV: E=Sophos;i="5.88,314,1635231600"; d="scan'208";a="226232164" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jan 2022 00:38:42 -0800 X-IronPort-AV: E=Sophos;i="5.88,314,1635231600"; d="scan'208";a="617542690" Received: from shwdenpg197.ccr.corp.intel.com ([10.253.109.35]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jan 2022 00:38:40 -0800 From: DongJunX To: dts@dpdk.org Cc: lijuan.tu@intel.com, qingx.sun@intel.com, junx.dong@intel.com Subject: [DTS][V2 0/2] Add function to support ASan test Date: Tue, 25 Jan 2022 16:38:34 +0800 Message-Id: <20220125083836.2354-1-junx.dong@intel.com> X-Mailer: git-send-email 2.33.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 About ASan: AddressSanitizer a.k.a. ASan is a widely-used debugging tool to detect memory access errors. It helps to detect issues like use-after-free, various kinds of buffer overruns in C/C++ programs, and other similar errors, as well as printing out detailed debug information whenever an error is detected. ASan is integrated with gcc and clang and can be enabled via a meson option: -Db_sanitize=address, See the documentation for details (especially regarding clang). About ASan test: DTS adds one parameter named asan to control ASan test, It contains three steps: - Append ASan build parameters to meson build options. this may open the function of ASan detect memory access errors. if occuring memory access errors, the stack info will recorded in DTS log - After all cases tested finish, analyze DTS log and redefine case test result according to whether case log contain memory access error info. modify the result to failed if contain otherwise inherit the original result. - Generate ASan report to distinguish it from the original report. V2: framework/*: Add function to support ASan test doc/*: Add ASan test user guide conf/asan.cfg | 6 + doc/dts_gsg/usr_guide/asan_test.rst | 67 +++++ framework/asan_test.py | 393 ++++++++++++++++++++++++++++ framework/dts.py | 10 +- main.py | 6 +- 5 files changed, 479 insertions(+), 3 deletions(-) create mode 100644 conf/asan.cfg create mode 100644 doc/dts_gsg/usr_guide/asan_test.rst create mode 100644 framework/asan_test.py -- 2.33.1.windows.1