Skip to content

Commit fc87667

Browse files
pmaxhoganclaude
andauthored
test(chaos): fix NTFS volume probe so Windows hazard scenarios run (#68)
The chaos harness's NTFS-volume capability probe read the drive letter from the first character of a **relative** fixture path (`target/chaos-fixtures` -> `t` -> a nonexistent `T:\`), so `cap:ntfs_volume` was never detected and **every NTFS hazard scenario silently skipped on Windows and in CI** -- the `chaos hermetic` / `chaos fake-drive (windows-latest)` jobs were green while exercising none of them. **Fix:** resolve the fixture root to an absolute path so the probe reads the real drive letter (`C:`). **Verified locally:** `run-all` goes from 61 -> 74 scenarios actually executed (ADS, junctions, reparse points, recursive junction cycles, sparse/compressed/EFS files, hardlinks, reserved/surrogate names), 0 real failures. Surfaced while running the #23 crypto/restore soak natively on Windows. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 3dbae06 commit fc87667

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

crates/driven-chaos/src/capabilities.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,14 @@ impl CapabilitySet {
208208
/// best-effort so the probes have an existing path to stat, and falls back to
209209
/// the temp dir when it cannot be created (for example, a read-only checkout).
210210
fn fixture_root_dir() -> std::path::PathBuf {
211-
let root = std::path::PathBuf::from("target/chaos-fixtures");
211+
// Absolute, so the Windows volume/NTFS probe can read the real drive letter
212+
// from the path's first component. A relative "target/chaos-fixtures"
213+
// mis-parses the leading 't' as the drive letter (probing a nonexistent
214+
// `T:\`), so `cap:ntfs_volume` was never detected and every NTFS scenario
215+
// silently skipped on Windows (and in CI).
216+
let root = std::env::current_dir()
217+
.map(|d| d.join("target/chaos-fixtures"))
218+
.unwrap_or_else(|_| std::path::PathBuf::from("target/chaos-fixtures"));
212219
match std::fs::create_dir_all(&root) {
213220
Ok(()) => root,
214221
Err(_) => std::env::temp_dir(),

0 commit comments

Comments
 (0)