Cuts off the last 1/10th of file at 'path'.
| 757 | namespace { |
| 758 | // Cuts off the last 1/10th of file at 'path'. |
| 759 | void corruptFile(const std::string& path) { |
| 760 | const auto fd = ::open(path.c_str(), O_WRONLY); |
| 761 | const auto size = ::lseek(fd, 0, SEEK_END); |
| 762 | const auto rc = ftruncate(fd, size / 10 * 9); |
| 763 | ASSERT_EQ(rc, 0); |
| 764 | } |
| 765 | } // namespace |
| 766 | |
| 767 | TEST_F(AsyncDataCacheTest, DISABLED_ssd) { |