diff --git a/test/Makefile b/test/Makefile index f4bca7d0..e4d81c13 100644 --- a/test/Makefile +++ b/test/Makefile @@ -14,6 +14,8 @@ GNUTLS = 0 HOST_BACKEND = 1 GUEST_BACKEND = 1 +export ASAN_OPTIONS = abort_on_error=1 + define test_host @$(py) host_tests.py @$(py) host_generate_tests.py diff --git a/test/common.py b/test/common.py index bd606444..a04b7310 100644 --- a/test/common.py +++ b/test/common.py @@ -1,6 +1,7 @@ import unittest import subprocess import os +import signal SECTOOLS = os.environ.get("SECVAR_TOOL", "../bin/secvarctl-dbg") SECVARPATH = "/sys/firmware/secvar/vars/" @@ -31,7 +32,11 @@ def command(self, args): print(f"Error in command '{' '.join(args)}") raise e - return CommandOutput(out) + ret = CommandOutput(out) + if out.returncode < 0: + sig = signal.Signals(-out.returncode).name + self.assertTrue(out.returncode >= 0, msg=f"Command exited via signal {sig}: '{' '.join(args)}'\n{ret}'") + return ret def assertCmd(self, args, expected: bool): tmp_assert, msg = {