From: Frantisek Sumsal Date: Tue, 5 Mar 2024 12:24:18 +0000 (+0100) Subject: test: bump the timeout for test-execute subtests if running w/ QEMU X-Git-Tag: v256-rc1~637 X-Git-Url: http://git-history.diyao.me/?a=commitdiff_plain;h=75c8b98090f302c5579054c10a963ed8d4ba1bb5;p=systemd%2F.git test: bump the timeout for test-execute subtests if running w/ QEMU Bump the timeout for test-execute subtests if running with plain QEMU (as part of TEST-02-UNITTESTS), since we might start hitting the default 2m timeout with some more involved subtests, especially when the AWS region we're running in is under heavy load. I see this regularly in the CentOS Stream 9 nightly cron job with exec-dynamicuser-statedir.service which has a lot of ExecStart's. --- diff --git a/src/test/test-execute.c b/src/test/test-execute.c index 6a574b495f..76659fe071 100644 --- a/src/test/test-execute.c +++ b/src/test/test-execute.c @@ -61,6 +61,11 @@ static void wait_for_service_finish(Manager *m, Unit *unit) { assert_se(m); assert_se(unit); + /* Bump the timeout when running in plain QEMU, as some more involved tests might start hitting the + * default 2m timeout (like exec-dynamicuser-statedir.service) */ + if (detect_virtualization() == VIRTUALIZATION_QEMU) + timeout *= 2; + service = SERVICE(unit); printf("%s\n", unit->id); exec_context_dump(&service->exec_context, stdout, "\t");