summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schmidt <s.schmidt@samsung.com>2019-08-19 14:17:28 +0200
committerStefan Schmidt <s.schmidt@samsung.com>2019-11-27 14:21:25 +0100
commitf8253267505879a3baf49849fc4780156919030f (patch)
tree1b2df7474f20aef07c666346dcf28122c82405dc
parent3bc0fef21ce5cd16799da5f47d3a36abc0aa8201 (diff)
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
-rw-r--r--.ci/asan-ignore-leaks.supp16
-rwxr-xr-x.ci/ci-configure.sh8
-rwxr-xr-x.ci/ci-make-check.sh6
-rwxr-xr-x.ci/ci-make-install.sh4
-rwxr-xr-x.ci/ci-make.sh4
-rw-r--r--.travis.yml3
6 files changed, 39 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 @@
1# Evas
2leak:evas_module_find_type
3leak:generic_cache_new
4# Edje / cpplib
5leak:handle_directive
6# Edje_cc
7leak:edje_cc
8leak:_efl_loop_message_handler_message_send
9leak:ecore_ipc_client_add
10# Elm_prefs_cc
11leak:st_collection_page_items_item_label
12leak:st_collection_page_items_item_name
13leak:st_collection_page_items_item_string_placeholder
14leak:st_collection_page_items_item_string_default
15leak:st_collection_page_items_item_string_deny
16leak: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
69 travis_endfold cov-download 69 travis_endfold cov-download
70 fi 70 fi
71 71
72 if [ "$1" = "mingw" ]; then 72 if [ "$1" = "asan" ]; then
73 travis_fold meson meson
74 docker exec --env EIO_MONITOR_POLL=1 --env CC="ccache gcc" \
75 --env CXX="ccache g++" --env CFLAGS="-O0 -g" --env CXXFLAGS="-O0 -g" \
76 --env LD="ld.gold" $(cat $HOME/cid) sh -c "mkdir build && meson build $OPTS -Db_sanitize=address"
77 travis_endfold meson
78 elif [ "$1" = "mingw" ]; then
73 OPTS="$OPTS $MINGW_COPTS" 79 OPTS="$OPTS $MINGW_COPTS"
74 travis_fold cross-native cross-native 80 travis_fold cross-native cross-native
75 docker exec $(cat $HOME/cid) sh -c '.ci/bootstrap-efl-native-for-cross.sh' 81 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
23travis_fold check "ninja test" 23travis_fold check "ninja test"
24if [ "$DISTRO" != "" ] ; then 24if [ "$DISTRO" != "" ] ; then
25 for tries in $(seq 1 ${NUM_TRIES}); do 25 for tries in $(seq 1 ${NUM_TRIES}); do
26 (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 26 if [ "$1" = "asan" ]; then
27 (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
28 else
29 (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
30 fi
27 docker exec --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) cat build/meson-logs/testlog-dbus-launch.txt 31 docker exec --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) cat build/meson-logs/testlog-dbus-launch.txt
28 if [ $tries != ${NUM_TRIES} ] ; then echo "tests failed, trying again!" ; fi 32 if [ $tries != ${NUM_TRIES} ] ; then echo "tests failed, trying again!" ; fi
29 false 33 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
9 exit 0 9 exit 0
10fi 10fi
11travis_fold install "ninja install" 11travis_fold install "ninja install"
12if [ "$1" = "asan" ]; then
13 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
14 exit $?
15fi
12if [ "$DISTRO" != "" ] ; then 16if [ "$DISTRO" != "" ] ; then
13 docker exec --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) ninja -C build install 17 docker exec --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) ninja -C build install
14else 18else
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
6 exit 0 6 exit 0
7fi 7fi
8travis_fold ninja ninja 8travis_fold ninja ninja
9if [ "$1" = "asan" ]; then
10 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
11 exit $?
12fi
9if [ "$DISTRO" != "" ] ; then 13if [ "$DISTRO" != "" ] ; then
10 if [ "$1" = "coverity" ] ; then 14 if [ "$1" = "coverity" ] ; then
11 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" 15 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"
diff --git a/.travis.yml b/.travis.yml
index e42f637fa9..587dbe939d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -71,6 +71,9 @@ jobs:
71 - os: linux 71 - os: linux
72 if: type = cron 72 if: type = cron
73 env: DISTRO=Fedora31 CI_BUILD_TYPE=coverity 73 env: DISTRO=Fedora31 CI_BUILD_TYPE=coverity
74 - os: linux
75 if: type = cron
76 env: DISTRO=Fedora31 CI_BUILD_TYPE=asan
74 77
75services: 78services:
76 - docker 79 - docker