| 211 | } |
| 212 | |
| 213 | Status TestWritableFile::Sync() { |
| 214 | if (!env_->IsFilesystemActive()) { |
| 215 | return Status::OK(); |
| 216 | } |
| 217 | // Ensure new files referred to by the manifest are in the filesystem. |
| 218 | Status s = target_->Sync(); |
| 219 | if (s.ok()) { |
| 220 | state_.pos_at_last_sync_ = state_.pos_; |
| 221 | } |
| 222 | if (env_->IsFileCreatedSinceLastDirSync(state_.filename_)) { |
| 223 | Status ps = SyncParent(); |
| 224 | if (s.ok() && !ps.ok()) { |
| 225 | s = ps; |
| 226 | } |
| 227 | } |
| 228 | return s; |
| 229 | } |
| 230 | |
| 231 | Status FaultInjectionTestEnv::NewWritableFile(const std::string& fname, |
| 232 | WritableFile** result) { |
no test coverage detected