fuse unit tests and fixes
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
This commit is contained in:
parent
6300270a21
commit
5ea9f27645
@ -489,6 +489,30 @@ TYPED_TEST(fuse_test, create_open_fails_if_path_is_directory) {
|
|||||||
|
|
||||||
this->rmdir_and_test(dir_path);
|
this->rmdir_and_test(dir_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TYPED_TEST(fuse_test, create_open_fails_if_path_does_not_exist) {
|
||||||
|
std::array<int, 10U> 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::string file_name{"create_test"};
|
||||||
|
auto file_path = this->create_file_path(file_name);
|
||||||
|
|
||||||
|
for (auto &&flags : ops) {
|
||||||
|
auto handle = open(file_path.c_str(), flags);
|
||||||
|
EXPECT_EQ(-1, handle);
|
||||||
|
EXPECT_EQ(ENOENT, errno);
|
||||||
|
}
|
||||||
|
}
|
||||||
} // namespace repertory
|
} // namespace repertory
|
||||||
|
|
||||||
#endif // !defined(_WIN32)
|
#endif // !defined(_WIN32)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user