[Enhancement](chore) Some Status relevant enhancement (#23072)

This commit is contained in:
plat1ko
2023-08-21 14:14:38 +08:00
committed by GitHub
parent 81dd00f6e4
commit d4694167a8
35 changed files with 89 additions and 93 deletions

View File

@ -471,8 +471,8 @@ Status read_write_test_file(const std::string& test_file_path) {
size_t bytes_read = 0;
RETURN_IF_ERROR(file_reader->read_at(0, {read_buff.get(), TEST_FILE_BUF_SIZE}, &bytes_read));
if (memcmp(write_buff.get(), read_buff.get(), TEST_FILE_BUF_SIZE) != 0) {
return Status::Error<TEST_FILE_ERROR>(
"the test file write_buf and read_buf not equal, file_name={}.", test_file_path);
return Status::IOError("the test file write_buf and read_buf not equal, file_name={}.",
test_file_path);
}
// delete file
return io::global_local_filesystem()->delete_file(test_file_path);