Windows: qualify ConfigurationAsync, MCP, Resilience, ResilienceAsync, Script, LogConfig, FunctionalCoreFormatting and SystemAsync

- AsyncWatcher: implement Windows path probing (size, mtime, type,
  symlink target through std::filesystem) - it was a no-op, so polling
  watchers never observed changes.
- ConfigurationAsync test: poll until the asynchronous file event is
  delivered instead of assuming one poll.
- SystemAsync shutdown test: skip on Windows (POSIX process helper).

Windows cross build under Wine 11 (x86_64-w64-mingw32 GCC 16.2):
1178 tests, 1162 passed, 16 skipped, 0 failed.
This commit is contained in:
faumaray committed 2026-12-06 02:47:29 +03:00
1 parent c6ba2f42b5
commit 8510ea197f
4 files changed
+62 -3

No files matched your search

@@ -15,6 +15,7 @@
#include <stdexcept>
#include <stop_token>
#include <string>
#include <thread>
#include <vector>
namespace void_cfg_async_test
@@ -316,8 +317,18 @@ Void::Testing::Test config_async_watcher_coalescing_and_prepare_external()
Void::FileSystem::write_file(cfg_path,
R"({"host":"watched","port":8099})")
.has_value());
watcher.poll_once();
(void)exec.drain();
// File events are asynchronous (inotify on Linux, ReadDirectoryChangesW
// on Windows): poll until the reload is delivered.
bool reloaded = false;
for (int attempt = 0; attempt < 200 && !reloaded; ++attempt) {
watcher.poll_once();
(void)exec.drain();
reloaded = ctrl->current().values->host == "watched";
if (!reloaded) {
std::this_thread::sleep_for(std::chrono::milliseconds{5});
}
}
Void::Testing::expect(reloaded);
Void::Testing::expect_eq(ctrl->current().values->host,
std::string{"watched"});
Void::Testing::expect_eq(ctrl->current().values->port, 8099);
@@ -125,6 +125,9 @@ public:
Void::Testing::Test systemasync_driver_shutdown_pending_pipe_read_retains_and_delivers_once()
{
#ifdef _WIN32
Void::Testing::skip("POSIX process helper is not available on Windows");
#endif
ScopedTempDir dir;
require(dir.valid());
const auto path = dir.file("pipe_gate.bin");