diff --git a/native/nt/dynamic_loader_test.cpp b/native/nt/dynamic_loader_test.cpp index f6a6700..b1101ba 100644 --- a/native/nt/dynamic_loader_test.cpp +++ b/native/nt/dynamic_loader_test.cpp @@ -50,7 +50,9 @@ int main(int argc, char **argv) } return bytes; }; - const auto result = raven::run_native_process(modules, entry, argv[1], std::chrono::milliseconds(500), source); + // Process startup alone can take most of a second on a loaded host: only the looping DLLs need a short limit. + const auto timeout = std::chrono::milliseconds(selected.ends_with("loop") ? 2000 : 10000); + const auto result = raven::run_native_process(modules, entry, argv[1], timeout, source); const auto address = modules.resolve({"client.exe", "entered", 0, false, 0}) - entry.loaded.base(); check(address < entry.loaded.data().size(), "fixture state is outside image"); const auto entered = entry.loaded.data()[static_cast(address)]; diff --git a/native/nt/loader_test.cpp b/native/nt/loader_test.cpp index 6ec2e9b..1f6c1d3 100644 --- a/native/nt/loader_test.cpp +++ b/native/nt/loader_test.cpp @@ -163,7 +163,8 @@ int main(int argc, char **argv) const auto address = modules.resolve({"client.exe", "exit_requested", 0, false, 0}); entry->loaded.data()[address - entry->loaded.base()] = 1; } - const auto timeout = std::chrono::milliseconds(extra == "loop.dll" ? 300 : 10000); + // The looping DLL must still be reached after base.dll and dependent.dll attach, which can take most of a second on a loaded host. + const auto timeout = std::chrono::milliseconds(extra == "loop.dll" ? 2000 : 10000); if (extra == "reject.dll") { bool rejected = false; try { raven::run_native_process(modules, *entry, argv[1], timeout); }