Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions llvm/unittests/Support/Path.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2042,6 +2042,10 @@ TEST_F(FileSystemTest, OpenDirectoryAsFileForRead) {
Expected<fs::file_t> FD = fs::openNativeFileForRead(TestDirectory);
#ifdef _WIN32
EXPECT_EQ(errorToErrorCode(FD.takeError()), errc::is_a_directory);
#elif defined(_AIX) || defined(__MVS__)
Comment thread
DanielCChen marked this conversation as resolved.
Outdated
// On AIX and z/OS, open() on a directory with O_RDONLY fails immediately
// with EISDIR, unlike Linux where open() succeeds and read() returns EISDIR.
EXPECT_EQ(errorToErrorCode(FD.takeError()), errc::is_a_directory);
#else
ASSERT_THAT_EXPECTED(FD, Succeeded());
scope_exit Close([&] { fs::closeFile(*FD); });
Expand Down
Loading