From 6300270a21ffffdb56984b8baae2bc974b3e33eb Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Wed, 13 Nov 2024 10:03:10 -0600 Subject: [PATCH] fuse unit tests and fixes --- .../src/fuse_drive_create_and_open_test.cpp | 22 +++++-------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/repertory/repertory_test/src/fuse_drive_create_and_open_test.cpp b/repertory/repertory_test/src/fuse_drive_create_and_open_test.cpp index c7bca921..44758832 100644 --- a/repertory/repertory_test/src/fuse_drive_create_and_open_test.cpp +++ b/repertory/repertory_test/src/fuse_drive_create_and_open_test.cpp @@ -472,35 +472,23 @@ TYPED_TEST(fuse_test, create_fails_if_invalid) { } TYPED_TEST(fuse_test, create_open_fails_if_path_is_directory) { - std::array ops{ - O_APPEND, - O_EXCL | O_WRONLY, - O_EXCL, - O_RDWR | O_APPEND, - O_RDWR | O_EXCL, - O_RDWR | O_TRUNC, - O_RDWR, - O_TRUNC, - O_WRONLY | O_APPEND, - O_WRONLY, + std::array ops{ + O_APPEND, O_EXCL | O_WRONLY, O_RDWR | O_APPEND, + O_RDWR | O_EXCL, O_RDWR | O_TRUNC, O_RDWR, + O_TRUNC, O_WRONLY | O_APPEND, O_WRONLY, }; std::string dir_name{"create_test"}; auto dir_path = this->create_directory_and_test(dir_name); for (auto &&flags : ops) { - auto handle = open(dir_path.c_str(), flags, ACCESSPERMS); + auto handle = open(dir_path.c_str(), flags); EXPECT_EQ(-1, handle); - if (handle != -1) { - std::cout << std::oct << flags << std::endl; - } - EXPECT_EQ(EISDIR, errno); } this->rmdir_and_test(dir_path); } - } // namespace repertory #endif // !defined(_WIN32)