[llvm] [Support] Report EISDIR when opening a directory (PR #79880)
Hubert Tong via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 15 08:42:55 PDT 2024
================
@@ -1296,6 +1296,39 @@ TEST_F(FileSystemTest, UTF8ToUTF16DirectoryIteration) {
}
#endif
+TEST_F(FileSystemTest, OpenDirectoryAsFileForRead) {
+ ASSERT_NO_ERROR(fs::create_directory(Twine(TestDirectory)));
----------------
hubert-reinterpretcast wrote:
The use of `TestDirectory` here does not seem consistent with the other uses of the `TestDirectory` that is shared between tests.
https://github.com/llvm/llvm-project/blob/b667596e78d16c613ef0b6d2d16d1ea1c3493f78/llvm/unittests/Support/Path.cpp#L665-L667
It seems that `TestDirectory` is created (and removed) by the test harness.
It seems we don't need to create/remove a directory here?
https://github.com/llvm/llvm-project/pull/79880
More information about the llvm-commits
mailing list