diff --git a/src/file.cpp b/src/file.cpp index 93e865069..ea0059b19 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -2096,7 +2096,7 @@ typedef struct _FILE_ALLOCATED_RANGE_BUFFER { // way. If fallocate failed with some other error, it // probably means the user should know about it, error out // and report it. - if (errno != ENOSYS && errno != EOPNOTSUPP) + if (errno != ENOSYS && errno != EOPNOTSUPP && errno != EINVAL) { ec.assign(errno, get_posix_category()); return false; diff --git a/test/test_storage.cpp b/test/test_storage.cpp index 266dc93a8..80790eca2 100644 --- a/test/test_storage.cpp +++ b/test/test_storage.cpp @@ -678,17 +678,31 @@ void test_remove(std::string const& test_path, bool unbuffered) s->m_settings = &set; s->m_disk_pool = &dp; + if (s->error()) + { + TEST_ERROR(s->error().message().c_str()); + fprintf(stderr, "default_storage::constructor %s: %s\n", s->error().message().c_str(), s->error_file().c_str()); + } + // allocate the files and create the directories s->initialize(true); - TEST_CHECK(!s->error()); if (s->error()) - fprintf(stderr, "%s: %s\n", s->error().message().c_str(), s->error_file().c_str()); + { + TEST_ERROR(s->error().message().c_str()); + fprintf(stderr, "default_storage::initialize %s: %s\n", s->error().message().c_str(), s->error_file().c_str()); + } TEST_CHECK(exists(combine_path(test_path, combine_path("temp_storage", combine_path("_folder3", combine_path("subfolder", "test5.tmp")))))); TEST_CHECK(exists(combine_path(test_path, combine_path("temp_storage", combine_path("folder2", "test3.tmp"))))); s->delete_files(); + if (s->error()) + { + TEST_ERROR(s->error().message().c_str()); + fprintf(stderr, "default_storage::delete_files %s: %s\n", s->error().message().c_str(), s->error_file().c_str()); + } + TEST_CHECK(!exists(combine_path(test_path, "temp_storage"))); }