All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: aconole@redhat.com, zhihongx.peng@intel.com,
	Michael Santana <maicolgabriel@hotmail.com>
Subject: [dpdk-dev] [PATCH v2 3/3] ci: run unit tests with ASAN
Date: Sat,  2 Oct 2021 18:24:32 +0200	[thread overview]
Message-ID: <20211002162432.4348-4-david.marchand@redhat.com> (raw)
In-Reply-To: <20211002162432.4348-1-david.marchand@redhat.com>

Enable ASAN for clang jobs.
This can greatly help identify leaks and buffer overflows.
This patch is more a fyi, as some unit tests stil have issues.

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 .ci/linux-build.sh | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index 91e43a975b..a961d9b92d 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -79,7 +79,14 @@ fi
 
 OPTS="$OPTS -Dmachine=default"
 OPTS="$OPTS --default-library=$DEF_LIB"
-OPTS="$OPTS --buildtype=debugoptimized"
+
+if [ "$CC" != "${CC%%clang}" ] && [ "$RUN_TESTS" = 'true' ]; then
+    # Let's run tests with ASAN
+    OPTS="$OPTS -Db_sanitize=address -Db_lundef=false --buildtype=debug"
+else
+    OPTS="$OPTS --buildtype=debugoptimized"
+fi
+
 OPTS="$OPTS -Dcheck_includes=true"
 meson build --werror $OPTS
 ninja -C build
-- 
2.23.0


  parent reply	other threads:[~2021-10-02 16:25 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-17  8:23 [dpdk-dev] [PATCH 0/3] Experiment ASAN in GHA David Marchand
2021-09-17  8:23 ` [dpdk-dev] [PATCH 1/3] bus/vmbus: fix leak on device scan David Marchand
2021-09-29 20:57   ` Long Li
2021-09-30  7:50     ` David Marchand
2021-09-30 19:14       ` Long Li
2021-10-01  6:47         ` David Marchand
2021-10-01 16:28           ` Long Li
2021-09-17  8:23 ` [dpdk-dev] [PATCH 2/3] test/latencystats: fix incorrect loop boundary David Marchand
2021-09-20  8:51   ` Pattan, Reshma
2021-09-17  8:23 ` [dpdk-dev] [PATCH 3/3] ci: run unit tests with ASAN David Marchand
2021-10-02 16:24 ` [dpdk-dev] [PATCH v2 0/3] Experiment ASAN in GHA David Marchand
2021-10-02 16:24   ` [dpdk-dev] [PATCH v2 1/3] bus/vmbus: fix leak on device scan David Marchand
2021-10-04 17:43     ` Long Li
2021-10-02 16:24   ` [dpdk-dev] [PATCH v2 2/3] test/latencystats: fix incorrect loop boundary David Marchand
2021-10-02 16:24   ` David Marchand [this message]
2021-10-05 12:00     ` [dpdk-dev] [PATCH v2 3/3] ci: run unit tests with ASAN Aaron Conole
2021-10-05 15:20   ` [dpdk-dev] [PATCH v2 0/3] Experiment ASAN in GHA David Marchand

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=20211002162432.4348-4-david.marchand@redhat.com \
    --to=david.marchand@redhat.com \
    --cc=aconole@redhat.com \
    --cc=dev@dpdk.org \
    --cc=maicolgabriel@hotmail.com \
    --cc=zhihongx.peng@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.