CI: Disable ASan fast unwinding for suppressions
Unfortunately just adding suppressions isn't enough; the build of Expat we have in our CI system does not have frame pointers, so ASan's fast unwinder can't see through it. This means that the suppressions we've added won't be taken into account. For now, disable the fast unwinder for the Xwayland test only. Disabling it globally is not practical as it massively increases the per-test runtime, so here (to avoid polluting the build system), we use a per-test wrapper to selectively choose the unwinder. Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
parent
6a06a06980
commit
c5ed892b1b
@ -202,7 +202,7 @@ aarch64-debian-container_prep:
|
||||
- $BUILDDIR/weston-virtme
|
||||
- $PREFIX
|
||||
reports:
|
||||
junit: $BUILDDIR/meson-logs/testlog.junit.xml
|
||||
junit: $BUILDDIR/meson-logs/testlog-per-test-asan.sh.junit.xml
|
||||
|
||||
# Same as above, but without running any tests.
|
||||
.build-no-test:
|
||||
|
20
.gitlab-ci/virtme-scripts/per-test-asan.sh
Executable file
20
.gitlab-ci/virtme-scripts/per-test-asan.sh
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
# When running Debian's Xwayland and fontconfig, we hit memory leaks which
|
||||
# aren't visible on other setups. We do have suppressions for these tests, but
|
||||
# regrettably ASan can't see through omitted frame pointers in Expat, so for
|
||||
# Xwayland specifically, we disable fast-unwind.
|
||||
#
|
||||
# Doing it globally makes the other tests far, far, too slow to run.
|
||||
case "$1" in
|
||||
*xwayland*)
|
||||
export ASAN_OPTIONS="detect_leaks=0,fast_unwind_on_malloc=0"
|
||||
;;
|
||||
*)
|
||||
export ASAN_OPTIONS="detect_leaks=0"
|
||||
;;
|
||||
esac
|
||||
|
||||
export ASAN_OPTIONS
|
||||
|
||||
exec "$@"
|
@ -26,13 +26,13 @@ export HOME=/root
|
||||
export PATH=$HOME/.local/bin:$PATH
|
||||
export PATH=/usr/local/bin:$PATH
|
||||
|
||||
export ASAN_OPTIONS=detect_leaks=0,atexit=1
|
||||
export SEATD_LOGLEVEL=debug
|
||||
|
||||
# run the tests and save the exit status
|
||||
# we give ourselves a very generous timeout multiplier due to ASan overhead
|
||||
echo 0x1f > /sys/module/drm/parameters/debug
|
||||
seatd-launch -- meson test --no-rebuild --timeout-multiplier 4
|
||||
seatd-launch -- meson test --no-rebuild --timeout-multiplier 4 \
|
||||
--wrapper $(pwd)/../.gitlab-ci/virtme-scripts/per-test-asan.sh
|
||||
# note that we need to store the return value from the tests in order to
|
||||
# determine if the test suite ran successfully or not.
|
||||
TEST_RES=$?
|
||||
|
Loading…
Reference in New Issue
Block a user