Lines Matching refs:offset
160 void CorruptFile(const std::string& fname, int offset, int bytes_to_corrupt) { in CorruptFile() argument
167 if (offset < 0) { in CorruptFile()
169 if (-offset > sbuf.st_size) { in CorruptFile()
170 offset = 0; in CorruptFile()
172 offset = static_cast<int>(sbuf.st_size + offset); in CorruptFile()
175 if (offset > sbuf.st_size) { in CorruptFile()
176 offset = static_cast<int>(sbuf.st_size); in CorruptFile()
178 if (offset + bytes_to_corrupt > sbuf.st_size) { in CorruptFile()
179 bytes_to_corrupt = static_cast<int>(sbuf.st_size - offset); in CorruptFile()
187 contents[i + offset] ^= 0x80; in CorruptFile()
196 void Corrupt(FileType filetype, int offset, int bytes_to_corrupt) { in Corrupt() argument
214 CorruptFile(fname, offset, bytes_to_corrupt); in Corrupt()
219 void CorruptTableFileAtLevel(int level, int offset, int bytes_to_corrupt) { in CorruptTableFileAtLevel() argument
224 CorruptFile(dbname_ + "/" + m.name, offset, bytes_to_corrupt); in CorruptTableFileAtLevel()
559 CorruptFile(filename, static_cast<int>(range_del_handle.offset()), 1); in TEST_F()