@@ -148,17 +148,13 @@ else
CFLAGS_FOR_OVS="${CFLAGS_FOR_OVS} ${SPARSE_FLAGS}"
fi
-if [ "$ASAN" ]; then
- # This will override default option configured in tests/atlocal.in.
+if [ "$SANITIZERS" ]; then
+ # This will override the default ASAN_OPTIONS configured in
+ # tests/atlocal.in, however, it will use the defined UBSAN_OPTIONS.
export ASAN_OPTIONS='detect_leaks=1'
CFLAGS_ASAN="-fno-omit-frame-pointer -fno-common -fsanitize=address"
- CFLAGS_FOR_OVS="${CFLAGS_FOR_OVS} ${CFLAGS_ASAN}"
-fi
-
-if [ "$UBSAN" ]; then
- # Use the default options configured in tests/atlocal.in, in UBSAN_OPTIONS.
- CFLAGS_UBSAN="-fno-omit-frame-pointer -fno-common -fsanitize=undefined"
- CFLAGS_FOR_OVS="${CFLAGS_FOR_OVS} ${CFLAGS_UBSAN}"
+ CFLAGS_UBSAN="-fsanitize=undefined"
+ CFLAGS_FOR_OVS="${CFLAGS_FOR_OVS} ${CFLAGS_ASAN} ${CFLAGS_UBSAN}"
fi
OPTS="${EXTRA_OPTS} ${OPTS} $*"
@@ -9,14 +9,13 @@ jobs:
automake libtool gcc bc libjemalloc2 libjemalloc-dev \
libssl-dev llvm-dev libelf-dev libnuma-dev libpcap-dev \
ninja-build selinux-policy-dev libbpf-dev
- ASAN: ${{ matrix.asan }}
- UBSAN: ${{ matrix.ubsan }}
CC: ${{ matrix.compiler }}
DPDK: ${{ matrix.dpdk }}
DPDK_SHARED: ${{ matrix.dpdk_shared }}
LIBS: ${{ matrix.libs }}
M32: ${{ matrix.m32 }}
OPTS: ${{ matrix.opts }}
+ SANITIZERS: ${{ matrix.sanitizers }}
TESTSUITE: ${{ matrix.testsuite }}
name: linux ${{ join(matrix.*, ' ') }}
@@ -36,10 +35,7 @@ jobs:
testsuite: test
- compiler: clang
testsuite: test
- asan: asan
- - compiler: clang
- testsuite: test
- ubsan: ubsan
+ sanitizers: sanitizers
- compiler: gcc
testsuite: test
Combine the ASAN and UBSAN tests into a single sanitizer run. Signed-off-by: Eelco Chaudron <echaudro@redhat.com> --- v2: Introduction of this patch in the patch set. v3: Moved Ubuntu test image upgrade to second patch. .ci/linux-build.sh | 14 +++++--------- .github/workflows/build-and-test.yml | 8 ++------ 2 files changed, 7 insertions(+), 15 deletions(-)