diff options
author | Stefan Schmidt <s.schmidt@samsung.com> | 2019-08-19 14:17:28 +0200 |
---|---|---|
committer | Stefan Schmidt <s.schmidt@samsung.com> | 2019-11-27 14:21:25 +0100 |
commit | f8253267505879a3baf49849fc4780156919030f (patch) | |
tree | 1b2df7474f20aef07c666346dcf28122c82405dc /.ci | |
parent | 3bc0fef21ce5cd16799da5f47d3a36abc0aa8201 (diff) | |
download | efl-f8253267505879a3baf49849fc4780156919030f.tar.gz |
ci: travis: add job to build efl and run tests with address sanitizer
A first step to have addrress sanitizer coverage on our EFL build. It
already catched some use after free errors and memory corruptions. Still
we have some limititation how we are running this right now. We
currently ignore some leaks that are exposed durign the normal build
wile haveing the short living runs of edje_cc, elm_prefs_cc, etc.
For now the whole leak detection is disabled on the testsuite as well.
This is still very valuable, especially for all non-leak cases it finds,
thus we are goign to run this on our daily build.
Signed-off-by: Stefan Schmidt <s.schmidt@samsung.com>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10691
Diffstat (limited to '.ci')
-rw-r--r-- | .ci/asan-ignore-leaks.supp | 16 | ||||
-rwxr-xr-x | .ci/ci-configure.sh | 8 | ||||
-rwxr-xr-x | .ci/ci-make-check.sh | 6 | ||||
-rwxr-xr-x | .ci/ci-make-install.sh | 4 | ||||
-rwxr-xr-x | .ci/ci-make.sh | 4 |
5 files changed, 36 insertions, 2 deletions
diff --git a/.ci/asan-ignore-leaks.supp b/.ci/asan-ignore-leaks.supp new file mode 100644 index 0000000000..027800db9f --- /dev/null +++ b/.ci/asan-ignore-leaks.supp @@ -0,0 +1,16 @@ +# Evas +leak:evas_module_find_type +leak:generic_cache_new +# Edje / cpplib +leak:handle_directive +# Edje_cc +leak:edje_cc +leak:_efl_loop_message_handler_message_send +leak:ecore_ipc_client_add +# Elm_prefs_cc +leak:st_collection_page_items_item_label +leak:st_collection_page_items_item_name +leak:st_collection_page_items_item_string_placeholder +leak:st_collection_page_items_item_string_default +leak:st_collection_page_items_item_string_deny +leak:ob_collection_page_items_item diff --git a/.ci/ci-configure.sh b/.ci/ci-configure.sh index 035d154508..0cccda0eec 100755 --- a/.ci/ci-configure.sh +++ b/.ci/ci-configure.sh @@ -69,7 +69,13 @@ if [ "$DISTRO" != "" ] ; then travis_endfold cov-download fi - if [ "$1" = "mingw" ]; then + if [ "$1" = "asan" ]; then + travis_fold meson meson + docker exec --env EIO_MONITOR_POLL=1 --env CC="ccache gcc" \ + --env CXX="ccache g++" --env CFLAGS="-O0 -g" --env CXXFLAGS="-O0 -g" \ + --env LD="ld.gold" $(cat $HOME/cid) sh -c "mkdir build && meson build $OPTS -Db_sanitize=address" + travis_endfold meson + elif [ "$1" = "mingw" ]; then OPTS="$OPTS $MINGW_COPTS" travis_fold cross-native cross-native docker exec $(cat $HOME/cid) sh -c '.ci/bootstrap-efl-native-for-cross.sh' diff --git a/.ci/ci-make-check.sh b/.ci/ci-make-check.sh index 1578b3cb65..682d613544 100755 --- a/.ci/ci-make-check.sh +++ b/.ci/ci-make-check.sh @@ -23,7 +23,11 @@ NUM_TRIES=5 travis_fold check "ninja test" if [ "$DISTRO" != "" ] ; then for tries in $(seq 1 ${NUM_TRIES}); do - (docker exec --env EINA_LOG_BACKTRACE="0" --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) meson test -t 120 -C build --wrapper dbus-launch ) && break + if [ "$1" = "asan" ]; then + (docker exec --env EINA_LOG_BACKTRACE="0" --env EIO_MONITOR_POLL=1 --env ASAN_OPTIONS=detect_leaks=0:abort_on_error=0 $(cat $HOME/cid) meson test -t 120 -C build --wrapper dbus-launch) && break + else + (docker exec --env EINA_LOG_BACKTRACE="0" --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) meson test -t 120 -C build --wrapper dbus-launch ) && break + fi docker exec --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) cat build/meson-logs/testlog-dbus-launch.txt if [ $tries != ${NUM_TRIES} ] ; then echo "tests failed, trying again!" ; fi false diff --git a/.ci/ci-make-install.sh b/.ci/ci-make-install.sh index 74769896c3..08bf1db204 100755 --- a/.ci/ci-make-install.sh +++ b/.ci/ci-make-install.sh @@ -9,6 +9,10 @@ if [ "$1" = "coverity" ] ; then exit 0 fi travis_fold install "ninja install" +if [ "$1" = "asan" ]; then + docker exec --env EIO_MONITOR_POLL=1 --env ASAN_OPTIONS=abort_on_error=0 --env LSAN_OPTIONS=suppressions=/src/.ci/asan-ignore-leaks.supp $(cat $HOME/cid) ninja -C build install + exit $? +fi if [ "$DISTRO" != "" ] ; then docker exec --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) ninja -C build install else diff --git a/.ci/ci-make.sh b/.ci/ci-make.sh index 30f7d7c37d..c8d7332f05 100755 --- a/.ci/ci-make.sh +++ b/.ci/ci-make.sh @@ -6,6 +6,10 @@ if [ "$1" = "release-ready" ] ; then exit 0 fi travis_fold ninja ninja +if [ "$1" = "asan" ]; then + docker exec --env EIO_MONITOR_POLL=1 --env ASAN_OPTIONS=abort_on_error=0 --env LSAN_OPTIONS=suppressions=/src/.ci/asan-ignore-leaks.supp $(cat $HOME/cid) ninja -C build + exit $? +fi if [ "$DISTRO" != "" ] ; then if [ "$1" = "coverity" ] ; then docker exec --env EIO_MONITOR_POLL=1 --env PATH="/src/cov-analysis-linux64-2019.03/bin:$PATH" $(cat $HOME/cid) sh -c "cov-build --dir cov-int ninja -C build" |