ci: Combine UBSAN and ASAN by default

I only recently realized this was possible.  While we're still seeing
leaks in the CI environment for some reason, adding ASAN gives us
use-after-free detection etc., which is obviously still very useful
even if we're not doing leak checking.

Closes: #622
Approved by: jlebon
This commit is contained in:
Colin Walters 2016-12-07 21:26:43 -05:00 committed by Atomic Bot
parent 67ce5ec917
commit 5aefe17ee9
3 changed files with 10 additions and 6 deletions

View File

@ -11,6 +11,8 @@ RUN dnf install -y \
parallel \
clang \
libubsan \
libasan \
libtsan \
gnome-desktop-testing \
redhat-rpm-config \
elfutils \

View File

@ -8,8 +8,13 @@ required: true
container:
image: projectatomic/ostree-tester
packages:
- libasan
env:
CFLAGS: '-fsanitize=undefined'
CFLAGS: '-fsanitize=undefined -fsanitize=address'
ASAN_OPTIONS: 'detect_leaks=0' # Right now we're not fully clean, but this gets us use-after-free etc
# TODO when we're doing leak checks: G_SLICE: "always-malloc"
build:
config-opts: >

View File

@ -281,18 +281,15 @@ tests/%-symlink-stamp: % Makefile
# non-recursive Automake, so we change our code to canonically look
# for tests/ which is just a symlink when installed.
if ENABLE_INSTALLED_TESTS
install-test-data-file-path-hack:
install-installed-tests-extra:
if test -L $(DESTDIR)$(installed_testdir)/tests; then \
rm $(DESTDIR)$(installed_testdir)/tests; \
fi
ln -s . $(DESTDIR)$(installed_testdir)/tests
INSTALL_DATA_HOOKS += install-test-data-file-path-hack
install-libtest:
if BUILDOPT_ASAN
sed -e 's,^BUILT_WITH_ASAN=.*,BUILT_WITH_ASAN=1,' < $(srcdir)/tests/libtest.sh > $(DESTDIR)$(installed_testdir)/tests/libtest.sh
else
install -m 0644 $(srcdir)/tests/libtest.sh $(DESTDIR)$(installed_testdir)/tests/libtest.sh
endif
INSTALL_DATA_HOOKS += install-libtest
INSTALL_DATA_HOOKS += install-installed-tests-extra
endif