[thin-check] print out some info fields.

These are consumed by lvm.
This commit is contained in:
Joe Thornber
2018-11-09 12:43:21 +00:00
parent 5a309dd3bd
commit d1a41d01cc
2 changed files with 17 additions and 0 deletions

View File

@@ -126,6 +126,13 @@
(run-fail-rcv (_ stderr) (thin-check xml)
(assert-matches ".*This looks like XML. thin_check only checks the binary metadata format." stderr))))
(define-scenario (thin-check info-fields)
"Outputs info fields"
(with-valid-metadata (md)
(run-ok-rcv (stdout stderr) (thin-check md)
(assert-matches ".*TRANSACTION_ID=[0-9]+.*" stdout)
(assert-matches ".*METADATA_FREE_BLOCKS=[0-9]+.*" stdout))))
;;;-----------------------------------------------------------
;;; thin_restore scenarios
;;;-----------------------------------------------------------