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.
This commit is contained in:
Frantisek Sumsal
2024-03-05 18:50:14 +00:00
committed by Luca Boccassi
parent d08566fad7
commit 75c8b98090
+5
View File
@@ -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");