This commit is contained in:
Scott E. Graves 2023-12-10 14:02:10 -06:00
parent da7efdb1a8
commit 44acf7dace

View File

@ -280,7 +280,7 @@ static void test_ftruncate(const std::string &file_path) {
#ifndef __APPLE__
static void test_fallocate(const std::string &api_path,
const std::string &file_path, i_provider &provider) {
const std::string &file_path) {
std::cout << __FUNCTION__ << std::endl;
auto file =
open(file_path.c_str(), O_CREAT | O_RDWR, S_IRUSR | S_IWUSR | S_IRGRP);
@ -296,11 +296,6 @@ static void test_fallocate(const std::string &api_path,
file_size = 0U;
EXPECT_TRUE(utils::file::get_file_size(file_path, file_size));
EXPECT_EQ(16U, file_size);
filesystem_item fsi{};
EXPECT_EQ(api_error::success,
provider.get_filesystem_item(api_path, false, fsi));
EXPECT_EQ(16U, fsi.size);
}
#endif
@ -631,7 +626,7 @@ TEST(fuse_drive, all_tests) {
#ifndef __APPLE__
file_path = create_file_and_test(mount_location, "fallocate_file_test");
test_fallocate(utils::path::create_api_path("fallocate_file_test"),
file_path, *provider_ptr);
file_path);
unlink_file_and_test(file_path);
#endif