aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/VirtualFileSystemTest.cpp
diff options
context:
space:
mode:
authorjeremyd2019 <github@jdrake.com>2025-08-01 10:35:09 -0700
committerGitHub <noreply@github.com>2025-08-01 10:35:09 -0700
commit46f6e62eb9ea01e43ec45961e68c22f9c00b0a27 (patch)
treec02d880f06eafd412c98aefb85dda1c31762f0ce /llvm/unittests/Support/VirtualFileSystemTest.cpp
parent4c80193a58a5c24e2bbebe291feb406191c4e2ab (diff)
downloadllvm-46f6e62eb9ea01e43ec45961e68c22f9c00b0a27.zip
llvm-46f6e62eb9ea01e43ec45961e68c22f9c00b0a27.tar.gz
llvm-46f6e62eb9ea01e43ec45961e68c22f9c00b0a27.tar.bz2
[LLVM][Support] Fix tests on Cygwin (#151417)
Cygwin returns -1 for `getconf(_SC_ARG_MAX)`, which makes `llvm::sys::commandLineFitsWithinSystemLimits` always return true, so skip the `ArgumentLimit` test in that case. Skip the `ArgumentLimitWindows` and `ResponseFileWindows` tests on Cygwin also as it doesn't suffer from the Windows limits either. Cygwin requires the same `dllexport` annotation as Win32 in the `DynamicLibrary` test, so add its preprocessor check to PipSqueak.h. Cygwin's `getcwd` function does not fail with `ENOENT` if the current working directory is unlinked. According to POSIX issue 8, this is not required. Skip the `PhysicalFileSystemWorkingDirFailure` test on Cygwin as it relies on this behavior.
Diffstat (limited to 'llvm/unittests/Support/VirtualFileSystemTest.cpp')
-rw-r--r--llvm/unittests/Support/VirtualFileSystemTest.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/unittests/Support/VirtualFileSystemTest.cpp b/llvm/unittests/Support/VirtualFileSystemTest.cpp
index fc3ccea..6228de8 100644
--- a/llvm/unittests/Support/VirtualFileSystemTest.cpp
+++ b/llvm/unittests/Support/VirtualFileSystemTest.cpp
@@ -553,6 +553,10 @@ TEST(VirtualFileSystemTest, PhysicalFileSystemWorkingDirFailure) {
// Some platforms (e.g. Solaris) disallow removal of the working directory.
GTEST_SKIP() << "test requires deletion of working directory";
+#ifdef __CYGWIN__
+ GTEST_SKIP() << "Cygwin getcwd succeeds with unlinked working directory";
+#endif
+
// Verify that we still get two separate working directories.
auto FS1 = vfs::createPhysicalFileSystem();
auto FS2 = vfs::createPhysicalFileSystem();