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.
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");