fix: close the VBS-side gaps noted on Void/Library#61
VoidBuildSystem CI / sanitizers-gcc16 (push) Failing after 7s
VoidBuildSystem CI / signing-openssl-gcc16 (push) Failing after 13s
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 5s
VoidBuildSystem CI / wine-windows-gcc16 (push) Failing after 57s

This commit is contained in:
faumaray committed 2026-12-05 10:30:57 +03:00
1 parent 4f581d1b51
commit 4d51331777
13 files changed
+158 -14

No files matched your search

+24
View File
@@ -112,6 +112,30 @@ VOID_TEST(CoreEngineTests, process_supervisor_exec_failure_and_early_leader_gran
std::this_thread::sleep_for(std::chrono::milliseconds{300});
Void::Testing::expect(!std::filesystem::exists(sentinel));
}
// 4. Without a request timeout, orphaned descendants are reaped after descendant_grace so
// test supervision never hangs (and the escaped grandchild is killed).
{
Void::FileSystem::TempDir tmp{"vbs_proc_"};
const auto sentinel = tmp / "orphan_escaped.txt";
Platform::ProcessRequest req;
req.executable = "/bin/sh";
req.arguments = {"-c", "sh -c 'trap \"\" TERM; sleep 1.5; echo escaped > \"" +
sentinel.string() + "\"' >/dev/null 2>&1 & exit 0"};
req.descendant_grace = std::chrono::milliseconds{150};
req.kill_grace = std::chrono::milliseconds{80};
const auto started = std::chrono::steady_clock::now();
auto res = Platform::run_supervised(req);
const auto elapsed = std::chrono::duration_cast<std::chrono::milliseconds>(
std::chrono::steady_clock::now() - started);
Void::Testing::expect(res.has_value());
if (res) {
Void::Testing::expect(res->succeeded());
}
Void::Testing::expect(elapsed < std::chrono::seconds{5});
std::this_thread::sleep_for(std::chrono::milliseconds{300});
Void::Testing::expect(!std::filesystem::exists(sentinel));
}
}
VOID_TEST(CoreEngineTests, profile_inheritance_and_cycle_rejection) {