[mutter] gitlab-ci: Use MALLOC_CHECK_ and MALLOC_PERTURB_ env variables in tests
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] gitlab-ci: Use MALLOC_CHECK_ and MALLOC_PERTURB_ env variables in tests
- Date: Thu, 16 May 2019 21:40:51 +0000 (UTC)
commit e96136e418ff670f80736e267aa37d160b1339ff
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Wed May 15 18:41:17 2019 -0500
gitlab-ci: Use MALLOC_CHECK_ and MALLOC_PERTURB_ env variables in tests
Linux glibc supports a malloc implementation that is allows to be tunable using
environment variables, to check allocation issues.
When MALLOC_CHECK_ is set to 3, a diagnostic message is printed on stderr and
the program is aborted.
Setting the MALLOC_PERTURB_ environment variable causes the malloc functions in
to return memory which has been wiped and initialized with the byte value of the
environment variable.
So use this features when running tests in order to catch better memory errors.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/578
.gitlab-ci.yml | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 6848fbe4c..867b529ae 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -35,10 +35,12 @@ test-mutter:
variables:
XDG_RUNTIME_DIR: "$CI_PROJECT_DIR/runtime-dir"
GSETTINGS_SCHEMA_DIR: "$CI_PROJECT_DIR/build/data"
+ MALLOC_CHECK_: "3"
script:
- mkdir -m 700 $XDG_RUNTIME_DIR
- glib-compile-schemas $GSETTINGS_SCHEMA_DIR
- >
+ env MALLOC_PERTURB_="$((RANDOM % 256 + 1))"
dbus-run-session -- xvfb-run -s '+iglx -noreset'
meson test -C build --no-rebuild -t 10 --verbose --no-stdsplit --wrap catchsegv
only:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]