
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.
29 lines
643 B
SYSTEMD
29 lines
643 B
SYSTEMD
[Unit]
|
|
Description=MariaDB MaxScale Database Proxy
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=forking
|
|
Restart=on-abort
|
|
|
|
# Make sure /var/run/maxscale exists
|
|
PermissionsStartOnly=true
|
|
ExecStartPre=/usr/bin/install -d @MAXSCALE_VARDIR@/run/maxscale -o maxscale -g maxscale
|
|
|
|
PIDFile=@MAXSCALE_VARDIR@/run/maxscale/maxscale.pid
|
|
|
|
# Use the default user and group
|
|
User=maxscale
|
|
Group=maxscale
|
|
|
|
ExecStart=@CMAKE_INSTALL_PREFIX@/@MAXSCALE_BINDIR@/maxscale
|
|
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
|