From d72c802415848bdc945227994506a8b1b0fbdd39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 13 Feb 2020 19:19:01 +0100 Subject: [PATCH] tests/fprintd: Ensure that the daemon doesn't crash or abort An application terminating because of a signal like SIGSEGV, SIGABRT and friends, will exit with a signal number that is 128 + $SIGNAL_NUMBER, so let's ensure that the daemon has not been terminated because of a such error This makes even more sense with address sanitizer builds, as the daemon would exit with abort. --- tests/fprintd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fprintd.py b/tests/fprintd.py index a402356..9cef334 100755 --- a/tests/fprintd.py +++ b/tests/fprintd.py @@ -241,7 +241,7 @@ class FPrintdTest(dbusmock.DBusTestCase): self.daemon.terminate() except OSError: pass - self.daemon.wait(timeout=2) + self.assertLess(self.daemon.wait(timeout=2), 128) self.daemon = None