(self)
| 369 | pass |
| 370 | |
| 371 | def validate(self): |
| 372 | # The first files should have been recovered into its original location |
| 373 | # with the correct layout: read back correct data |
| 374 | for i, n_bytes in enumerate(self.interesting_sizes): |
| 375 | try: |
| 376 | self._mount.validate_test_pattern("stripey/flushed_file_{0}".format(i), n_bytes) |
| 377 | except CommandFailedError as e: |
| 378 | self._errors.append( |
| 379 | ValidationError("File {0} (size {1}): {2}".format(i, n_bytes, e), traceback.format_exc(3)) |
| 380 | ) |
| 381 | |
| 382 | # The unflushed file should have been recovered into lost+found without |
| 383 | # the correct layout: read back junk |
| 384 | ino_name = "%x" % self._initial_state["unflushed_ino"] |
| 385 | self.assert_equal(self._mount.ls("lost+found", sudo=True), [ino_name]) |
| 386 | try: |
| 387 | self._mount.validate_test_pattern(os.path.join("lost+found", ino_name), 1024 * 512) |
| 388 | except CommandFailedError: |
| 389 | pass |
| 390 | else: |
| 391 | self._errors.append( |
| 392 | ValidationError("Unexpectedly valid data in unflushed striped file", "") |
| 393 | ) |
| 394 | |
| 395 | return self._errors |
| 396 | |
| 397 | |
| 398 | class ManyFilesWorkload(Workload): |
nothing calls this directly
no test coverage detected