From 688b7bbefd404fb1d1162d089f184a2a9cd1a9b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Wed, 2 Apr 2025 14:51:37 +0200 Subject: [PATCH] tests/fprintd: Increase timeout on waiting closed logs It seems we are taking longer in some CI runs, so let's be more generous in waiting for the thread to finish --- tests/fprintd.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/fprintd.py b/tests/fprintd.py index 8d8fe6e..47b7218 100644 --- a/tests/fprintd.py +++ b/tests/fprintd.py @@ -235,12 +235,13 @@ class FPrintdTest(dbusmock.DBusTestCase): argv = [self.paths['daemon'], '-t'] valgrind = os.getenv('VALGRIND') - if valgrind is not None: + self.valgrind = valgrind is not None + if self.valgrind: argv.insert(0, 'valgrind') argv.insert(1, '--leak-check=full') if os.path.exists(valgrind): argv.insert(2, '--suppressions=%s' % valgrind) - self.valgrind = True + self.kill_daemon = False self.daemon_log = OutputChecker() self.addCleanup(self.daemon_log.force_close) @@ -311,7 +312,7 @@ class FPrintdTest(dbusmock.DBusTestCase): else: raise(e) - self.daemon_log.assert_closed() + self.daemon_log.assert_closed(timeout=5 if self.valgrind else 3) if not self.kill_daemon: self.assertLess(self.daemon.returncode, 128) @@ -3172,12 +3173,13 @@ class FPrintdUtilsTest(FPrintdVirtualStorageDeviceBaseTest): argv = [self.utils[name]] + args valgrind = os.getenv('VALGRIND') - if valgrind is not None: + self.valgrind = valgrind is not None + if self.valgrind: argv.insert(0, 'valgrind') argv.insert(1, '--leak-check=full') if os.path.exists(valgrind): argv.insert(2, '--suppressions=%s' % valgrind) - self.valgrind = True + output = OutputChecker() self.utils_proc[name] = subprocess.Popen(argv, env=env,