Skip to content

Commit

Permalink
CI: use address sanitizer without leak checks
Browse files Browse the repository at this point in the history
Use address sanitizer to catch use-after-free and other errors when
running the test suite.

Leak detection is disabled, because currently there are too many leaks,
making almost all tests fail otherwise.

The atexit=1 is for verifying that ASan was actually used.

The default 128 MB of RAM in the qemu machine leads to oom-killer
killing most tests, so bump the memory size to 1 GB.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
  • Loading branch information
Pekka Paalanen committed May 12, 2021
1 parent a49ca3d commit 5de3b04
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ container_prep:
script:
- export PATH=~/.local/bin:$PATH
- cd "$BUILDDIR"
- meson --prefix="$PREFIX" ${MESON_OPTIONS} ..
- meson --prefix="$PREFIX" -Db_sanitize=address ${MESON_OPTIONS} ..
- ninja -k0
- ninja install
- virtme-run --rw --pwd --kimg /weston-virtme/bzImage --script-dir ../.gitlab-ci/virtme-scripts
- virtme-run --rw --pwd --kimg /weston-virtme/bzImage --script-dir ../.gitlab-ci/virtme-scripts --qemu-opts -m 1024
- TEST_RES=$(cat $TESTS_RES_PATH)
- rm $TESTS_RES_PATH
- cp -R /weston-virtme ./
Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci/virtme-scripts/run-weston-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export HOME=/root
while ! [ -e /run/seatd.sock ]; do sleep 0.1; done

# run the tests and save the exit status
ninja test
ASAN_OPTIONS=detect_leaks=0,atexit=1 ninja test
TEST_RES=$?

# create a file to keep the result of this script:
Expand Down

0 comments on commit 5de3b04

Please sign in to comment.