This document records the Windows-native coverage workflow that matches the
known-good win11 environment used for this repository.
It intentionally documents only what is implemented and validated in this repo. It does not claim generic MSVC/CI support that has not been exercised here.
Verified on 2026-03-18:
ctest --test-dir build --output-on-failure -j4:24/24passing onwin11bash tests/run-coverage-c-windows.sh 80:- script works
- full Windows
ctestsuite passes inside the script - coverage result:
67.5% - current status: below the draft
80%target
bash tests/run-coverage-go-windows.sh 80:- script works
- coverage result:
52.4% - current status: below the draft
80%target
Brutal truth:
- Windows coverage measurement is now implemented and validated.
- Windows coverage parity is not complete yet.
Script: tests/run-coverage-c-windows.sh
Measured Windows-specific C files:
src/libnetdata/netipc/src/service/netipc_service_win.csrc/libnetdata/netipc/src/transport/windows/netipc_named_pipe.csrc/libnetdata/netipc/src/transport/windows/netipc_win_shm.c
What it does:
- configures a fresh Windows coverage build with
NETIPC_COVERAGE=ON - builds with the native
win11MinGW64 toolchain and Ninja - runs the Windows
ctestsuite - collects
gcovline coverage for the Windows C sources above
Script: tests/run-coverage-go-windows.sh
Measured packages:
./pkg/netipc/protocol/./pkg/netipc/service/cgroups/./pkg/netipc/transport/windows/
What it does:
- runs the package tests natively on Windows
- merges the generated coverage profiles
- prints per-function and per-file coverage
- fails if no Windows transport coverage was collected
There is no validated Windows Rust coverage script in this repository yet.
Facts:
- Windows Rust code exists in:
src/crates/netipc/src/transport/windows.rssrc/crates/netipc/src/transport/win_shm.rs
- Linux coverage runs do not execute these modules.
- A reliable Windows-native Rust coverage workflow still needs to be designed and validated separately.
Use the native Windows Rust and Go toolchains plus MinGW64 GCC.
Recommended environment:
export PATH="/c/Users/costa/.cargo/bin:/c/Program Files/Go/bin:/mingw64/bin:$PATH"
export MSYSTEM=MINGW64
export CC=/mingw64/bin/gcc
export CXX=/mingw64/bin/g++Sanity check:
type -a cargo go gcc g++ cmake ninja gcovExpected shape:
cargofrom/c/Users/costa/.cargo/bingofrom/c/Program Files/Go/bingcc/g++/gcovfrom/mingw64/bin
bash tests/run-coverage-c-windows.sh 80bash tests/run-coverage-go-windows.sh 80The Windows code paths cannot be covered from Linux.
Reasons:
- Windows transport code depends on Win32 APIs
- Windows-only Go files are behind
//go:build windows - Rust Windows transport modules are behind
#[cfg(windows)]
Some branches require:
- allocation failure injection
- Win32 API fault injection
- timing/race orchestration
- resource exhaustion and handle-creation failures
Examples:
CreateNamedPipe/ConnectNamedPipefailure pathsCreateFileMapping/MapViewOfFilefailure paths- overlapped or wait-related timeout/error branches
- low-memory allocation failures in the Windows L2 layer
This repository now has validated Windows C and Go coverage entrypoints. Rust Windows coverage still needs:
- a chosen tool
- a validated
win11workflow - an agreed threshold or an explicit “report-only” policy
Facts:
test_win_stressis wired into Windowsctest- the currently validated default scope is the repeated WinSHM lifecycle case
Reason:
- the managed-service shutdown stress cases exposed a separate Windows
investigation area and are intentionally not part of the default
ctestpath until that behavior is understood and stabilized
COVERAGE-EXCLUSIONS.md is the cross-platform explanation of lines that still
need special infrastructure or fault injection.
This document is narrower:
- how to measure Windows coverage here
- what Windows coverage is currently implemented
- what is still missing on Windows specifically