From 0730dcb4a8ab84dc022ebcca9ffe7591bb9be53a Mon Sep 17 00:00:00 2001 From: John Ericson Date: Thu, 19 Feb 2026 17:21:46 -0500 Subject: [PATCH] Skip `chmodIfNeeded` test on Windows It doesn't do anything on Windows, it appears. --- src/libutil-tests/file-system.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libutil-tests/file-system.cc b/src/libutil-tests/file-system.cc index f92aa0492..eaf62f190 100644 --- a/src/libutil-tests/file-system.cc +++ b/src/libutil-tests/file-system.cc @@ -303,6 +303,9 @@ TEST(makeParentCanonical, root) * chmodIfNeeded * --------------------------------------------------------------------------*/ +#ifndef _WIN32 +// Windows doesn't support Unix-style permission bits - lstat always +// returns the same mode regardless of what chmod sets. TEST(chmodIfNeeded, works) { auto [autoClose_, tmpFile] = nix::createTempFile(); @@ -318,6 +321,7 @@ TEST(chmodIfNeeded, works) } } } +#endif TEST(chmodIfNeeded, nonexistent) {