upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/test/queue_proxy_test.cpp
diff options
context:
space:
mode:
authorcixotdev <339371196+cixotdev@users.noreply.github.com>2026-11-22 18:27:05 -0300
committercixotdev <339371196+cixotdev@users.noreply.github.com>2026-11-22 18:27:05 -0300
commit6c6843fced52021972476303dfb7486fa13ad503 (patch)
tree6b7d7764b7af212b36c68caf0e5802cc44a2c60c /runtime/test/queue_proxy_test.cpp
parentf847748cc76bd3777f9c070c4034eb2fc1c04e64 (diff)
fix(runtime/test): warm up two CreateProcessW starts in queue_proxy_test handle check
On Windows 11 26200, check_child_runner() previously ran one successful CreateProcessW and one failed CreateProcessW before recording handles_before. However, NtQueryObject shows that the second successful CreateProcessW still opens and caches one persistent HKCU registry key handle (\REGISTRY\USER\<SID>) in the parent process before stabilizing at +0 handles on the third and later calls. That caused `handles_after == handles_before` (e.g. 123 vs 124 under ctest) to abort queue_proxy_test before testing WARP, hardware D3D12, or Vulkan queue/fence proxies. Warm up two successful `run_self(L"--child-flood 0", 30000)` starts before recording `handles_before`, while keeping the strict `handles_after == handles_before` handle-leak assertion intact. AI-assisted with Argon (Antigravity).
Diffstat (limited to 'runtime/test/queue_proxy_test.cpp')
-rw-r--r--runtime/test/queue_proxy_test.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/runtime/test/queue_proxy_test.cpp b/runtime/test/queue_proxy_test.cpp
index 3d5ed98fa..142eae84e 100644
--- a/runtime/test/queue_proxy_test.cpp
+++ b/runtime/test/queue_proxy_test.cpp
@@ -999,12 +999,15 @@ int run_runner_child(const char* mode, unsigned long bytes) {
999int check_child_runner() { 999int check_child_runner() {
1000 const char* label = "child runner"; 1000 const char* label = "child runner";
1001 ChildResult report; 1001 ChildResult report;
1002 ChildRun run = run_self(L"--child-flood 0", 30000); 1002 ChildRun run;
1003 EXPECT(run.end == ChildEnd::exited && run.exit_code == 0 && parse_diff_report(run.tail, report)); 1003 // The first two successful starts and the first failed start make Windows load and cache their persistent process
1004 EXPECT(report.ran == 1 && report.hr == 0 && report.removed == 0 && report.validation == 0); 1004 // handles (on Windows 11 26200, a second CreateProcessW caches the HKCU root key and a failed CreateProcessW keeps
1005 // The first start and the first failed start make Windows load what it keeps for them (a failed CreateProcessW 1005 // 41-42 AppCompat/PCA handles; later starts add none). Warm up both before reading handles_before.
1006 // leaves 42 handles the first time on Windows 11 26200, none on every later one): both run once before the handle 1006 for (int warmup = 0; warmup < 2; ++warmup) {
1007 // count is taken, and every case after it must leave the count as it was. 1007 run = run_self(L"--child-flood 0", 30000);
1008 EXPECT(run.end == ChildEnd::exited && run.exit_code == 0 && parse_diff_report(run.tail, report));
1009 EXPECT(report.ran == 1 && report.hr == 0 && report.removed == 0 && report.validation == 0);
1010 }
1008 std::fprintf(stderr, "child runner: the next four errors are expected\n"); 1011 std::fprintf(stderr, "child runner: the next four errors are expected\n");
1009 const std::wstring missing = self_path() + L".missing.exe"; 1012 const std::wstring missing = self_path() + L".missing.exe";
1010 run = run_process(missing.c_str(), L"", 5000); 1013 run = run_process(missing.c_str(), L"", 5000);