MCPcopy Create free account
hub / github.com/ceph/ceph / validate

Method validate

qa/tasks/cephfs/test_data_scan.py:371–395  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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
398class ManyFilesWorkload(Workload):

Callers

nothing calls this directly

Calls 7

ValidationErrorClass · 0.85
validate_test_patternMethod · 0.80
formatMethod · 0.45
appendMethod · 0.45
assert_equalMethod · 0.45
lsMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected