Add ASAN options into systemd service files

By default ASAN only reports the errors and doesn't cause the program to
crash. By forcing a SIGABRT, the process will generate a core dump which
causes the test to fail.

Although the act of placing environment variables inside the systemd
service file might seem intrusive, they have no effect on non-ASAN
builds. This appears to be the most convenient and straightforward way of
changing ASAN behavior for testing.
This commit is contained in:
Markus Mäkelä 2018-09-25 22:37:06 +03:00
parent 7d2a5b2c13
commit 32fbd59f85
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

@ -21,5 +21,8 @@ TimeoutStartSec=120
LimitNOFILE=65535
StartLimitBurst=0
# Only relevant when MaxScale is linked with -fsanitize=address
Environment=ASAN_OPTIONS=abort_on_error=1
[Install]
WantedBy=multi-user.target