tests/sanitizer: make ASAN/LSAN/UBSAN options configurable in "tools/run-nm-test.sh"
Also add a suppressions file for LSAN.
This commit is contained in:
@@ -5097,6 +5097,7 @@ EXTRA_DIST += \
|
|||||||
src/ppp/nm-ppp-plugin.ver \
|
src/ppp/nm-ppp-plugin.ver \
|
||||||
Makefile.glib \
|
Makefile.glib \
|
||||||
autogen.sh \
|
autogen.sh \
|
||||||
|
lsan.suppressions \
|
||||||
valgrind.suppressions \
|
valgrind.suppressions \
|
||||||
meson.build \
|
meson.build \
|
||||||
meson_options.txt \
|
meson_options.txt \
|
||||||
|
0
lsan.suppressions
Normal file
0
lsan.suppressions
Normal file
@@ -228,6 +228,19 @@ if [[ -n "$BUILDDIR" ]]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
export ASAN_OPTIONS="$NM_TEST_ASAN_OPTIONS"
|
||||||
|
export LSAN_OPTIONS="$NM_TEST_LSAN_OPTIONS"
|
||||||
|
export UBSAN_OPTIONS="$NM_TEST_UBSAN_OPTIONS"
|
||||||
|
if [ -z "${NM_TEST_ASAN_OPTIONS+x}" ]; then
|
||||||
|
ASAN_OPTIONS="fast_unwind_on_malloc=false detect_leaks=1"
|
||||||
|
fi
|
||||||
|
if [ -z "${NM_TEST_LSAN_OPTIONS+x}" ]; then
|
||||||
|
LSAN_OPTIONS="suppressions=$SCRIPT_PATH/../lsan.suppressions"
|
||||||
|
fi
|
||||||
|
if [ -z "${NM_TEST_UBSAN_OPTIONS+x}" ]; then
|
||||||
|
UBSAN_OPTIONS="print_stacktrace=1:halt_on_error=1"
|
||||||
|
fi
|
||||||
|
|
||||||
if ! _is_true "$NMTST_USE_VALGRIND" 0; then
|
if ! _is_true "$NMTST_USE_VALGRIND" 0; then
|
||||||
export NM_TEST_UNDER_VALGRIND=0
|
export NM_TEST_UNDER_VALGRIND=0
|
||||||
exec "${NMTST_DBUS_RUN_SESSION[@]}" \
|
exec "${NMTST_DBUS_RUN_SESSION[@]}" \
|
||||||
|
Reference in New Issue
Block a user