From 5740843c4404caba7a38e1920fd0ed8a23a84084 Mon Sep 17 00:00:00 2001 From: Ilya Maximets Date: Fri, 22 Jan 2021 17:05:56 +0100 Subject: github: Run clang test with AddressSanitizer enabled. This commit is based on a similar one from OVN by Dumitru Ceara: a429b24f7bf5 ("ci: Enable AddressSanitizer in Linux clang CI test runs.") It's useful to run testsuite with address sanitizer enabled to catch memory leaks and invalid memory accesses. Skipping re-check if AddressSanitizer reports are present in the test run directory to not lose them. Right now OVS has no memory leaks detected on a testsuite run with -O1. With -O2 there are few false-positive leak reports in test-ovsdb application, so not using this optimization level for now. For the same reason not enabling leak detection by default for everyone. Enabled only in CI. AddressSanitizer increases execution time for this job from ~12 to ~16 minutes, but it looks like a reasonable sacrifice. Acked-by: Dumitru Ceara Signed-off-by: Ilya Maximets --- .github/workflows/build-and-test.yml | 2 ++ 1 file changed, 2 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index c4487226b..1bb72bbb1 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -14,6 +14,7 @@ jobs: deb_dependencies: | linux-headers-$(uname -r) build-essential fakeroot devscripts equivs AFXDP: ${{ matrix.afxdp }} + ASAN: ${{ matrix.asan }} CC: ${{ matrix.compiler }} DEB_PACKAGE: ${{ matrix.deb_package }} DPDK: ${{ matrix.dpdk }} @@ -44,6 +45,7 @@ jobs: - compiler: clang testsuite: test kernel: 3.16 + asan: asan - compiler: gcc testsuite: test -- cgit v1.2.1