9ae3a8
From 2e9f9fc69b25cd73b46750497f494d3ea28d21e6 Mon Sep 17 00:00:00 2001
9ae3a8
From: Max Reitz <mreitz@redhat.com>
9ae3a8
Date: Sat, 13 Jun 2015 16:22:24 +0200
9ae3a8
Subject: [PATCH 30/42] iotests: Fix test outputs
9ae3a8
9ae3a8
Message-id: <1434212556-3927-31-git-send-email-mreitz@redhat.com>
9ae3a8
Patchwork-id: 66049
9ae3a8
O-Subject: [RHEL-7.2 qemu-kvm PATCH 30/42] iotests: Fix test outputs
9ae3a8
Bugzilla: 1129893
9ae3a8
RH-Acked-by: Jeffrey Cody <jcody@redhat.com>
9ae3a8
RH-Acked-by: Fam Zheng <famz@redhat.com>
9ae3a8
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
9ae3a8
9ae3a8
BZ: 1129893
9ae3a8
9ae3a8
039, 060 and 061 all create images with referenced clusters having a
9ae3a8
refcount of 0. Because previous commits changed handling of such errors,
9ae3a8
these tests now have a different output. Fix it.
9ae3a8
9ae3a8
Furthermore, 060 created a refblock with a refcount greater than one
9ae3a8
which now results in having to rebuild the refcount structure as well.
9ae3a8
9ae3a8
Signed-off-by: Max Reitz <mreitz@redhat.com>
9ae3a8
Reviewed-by: Eric Blake <eblake@redhat.com>
9ae3a8
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
9ae3a8
(cherry picked from commit d26e6ec052b8768ab45654dbf35d5213818a2cb8)
9ae3a8
9ae3a8
Signed-off-by: Max Reitz <mreitz@redhat.com>
9ae3a8
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
9ae3a8
---
9ae3a8
 tests/qemu-iotests/039.out | 10 ++++++++--
9ae3a8
 tests/qemu-iotests/060.out | 10 ++++++++--
9ae3a8
 tests/qemu-iotests/061.out | 18 ++++++++++++------
9ae3a8
 3 files changed, 28 insertions(+), 10 deletions(-)
9ae3a8
9ae3a8
diff --git a/tests/qemu-iotests/039.out b/tests/qemu-iotests/039.out
9ae3a8
index 077fa64..d25bf0b 100644
9ae3a8
--- a/tests/qemu-iotests/039.out
9ae3a8
+++ b/tests/qemu-iotests/039.out
9ae3a8
@@ -24,7 +24,10 @@ read 512/512 bytes at offset 0
9ae3a8
 incompatible_features     0x1
9ae3a8
 
9ae3a8
 == Repairing the image file must succeed ==
9ae3a8
-Repairing cluster 5 refcount=0 reference=1
9ae3a8
+ERROR cluster 5 refcount=0 reference=1
9ae3a8
+Rebuilding refcount structure
9ae3a8
+Repairing cluster 1 refcount=1 reference=0
9ae3a8
+Repairing cluster 2 refcount=1 reference=0
9ae3a8
 The following inconsistencies were found and repaired:
9ae3a8
 
9ae3a8
     0 leaked clusters
9ae3a8
@@ -43,7 +46,10 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
9ae3a8
 wrote 512/512 bytes at offset 0
9ae3a8
 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
9ae3a8
 incompatible_features     0x1
9ae3a8
-Repairing cluster 5 refcount=0 reference=1
9ae3a8
+ERROR cluster 5 refcount=0 reference=1
9ae3a8
+Rebuilding refcount structure
9ae3a8
+Repairing cluster 1 refcount=1 reference=0
9ae3a8
+Repairing cluster 2 refcount=1 reference=0
9ae3a8
 wrote 512/512 bytes at offset 0
9ae3a8
 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
9ae3a8
 incompatible_features     0x0
9ae3a8
diff --git a/tests/qemu-iotests/060.out b/tests/qemu-iotests/060.out
9ae3a8
index 4f0c6d0..88332e4 100644
9ae3a8
--- a/tests/qemu-iotests/060.out
9ae3a8
+++ b/tests/qemu-iotests/060.out
9ae3a8
@@ -27,11 +27,15 @@ incompatible_features     0x0
9ae3a8
 qcow2: Marking image as corrupt: Preventing invalid write on metadata (overlaps with refcount block); further corruption events will be suppressed
9ae3a8
 write failed: Input/output error
9ae3a8
 incompatible_features     0x2
9ae3a8
-Repairing refcount block 0 refcount=2
9ae3a8
+ERROR refcount block 0 refcount=2
9ae3a8
+ERROR cluster 2 refcount=1 reference=2
9ae3a8
+Rebuilding refcount structure
9ae3a8
+Repairing cluster 1 refcount=1 reference=0
9ae3a8
+Repairing cluster 2 refcount=2 reference=1
9ae3a8
 The following inconsistencies were found and repaired:
9ae3a8
 
9ae3a8
     0 leaked clusters
9ae3a8
-    1 corruptions
9ae3a8
+    2 corruptions
9ae3a8
 
9ae3a8
 Double checking the fixed image now...
9ae3a8
 No errors were found on the image.
9ae3a8
@@ -59,6 +63,8 @@ incompatible_features     0x0
9ae3a8
 qcow2: Marking image as corrupt: Preventing invalid write on metadata (overlaps with inactive L2 table); further corruption events will be suppressed
9ae3a8
 write failed: Input/output error
9ae3a8
 incompatible_features     0x2
9ae3a8
+ERROR cluster 4 refcount=1 reference=2
9ae3a8
+Leaked cluster 9 refcount=1 reference=0
9ae3a8
 Repairing cluster 4 refcount=1 reference=2
9ae3a8
 Repairing cluster 9 refcount=1 reference=0
9ae3a8
 Repairing OFLAG_COPIED data cluster: l2_entry=8000000000040000 refcount=2
9ae3a8
diff --git a/tests/qemu-iotests/061.out b/tests/qemu-iotests/061.out
9ae3a8
index 4027e00..c5127cf 100644
9ae3a8
--- a/tests/qemu-iotests/061.out
9ae3a8
+++ b/tests/qemu-iotests/061.out
9ae3a8
@@ -76,8 +76,11 @@ autoclear_features        0x0
9ae3a8
 refcount_order            4
9ae3a8
 header_length             104
9ae3a8
 
9ae3a8
-Repairing cluster 5 refcount=0 reference=1
9ae3a8
-Repairing cluster 6 refcount=0 reference=1
9ae3a8
+ERROR cluster 5 refcount=0 reference=1
9ae3a8
+ERROR cluster 6 refcount=0 reference=1
9ae3a8
+Rebuilding refcount structure
9ae3a8
+Repairing cluster 1 refcount=1 reference=0
9ae3a8
+Repairing cluster 2 refcount=1 reference=0
9ae3a8
 magic                     0x514649fb
9ae3a8
 version                   2
9ae3a8
 backing_file_offset       0x0
9ae3a8
@@ -87,7 +90,7 @@ size                      67108864
9ae3a8
 crypt_method              0
9ae3a8
 l1_size                   1
9ae3a8
 l1_table_offset           0x30000
9ae3a8
-refcount_table_offset     0x10000
9ae3a8
+refcount_table_offset     0x80000
9ae3a8
 refcount_table_clusters   1
9ae3a8
 nb_snapshots              0
9ae3a8
 snapshot_offset           0x0
9ae3a8
@@ -230,8 +233,11 @@ autoclear_features        0x0
9ae3a8
 refcount_order            4
9ae3a8
 header_length             104
9ae3a8
 
9ae3a8
-Repairing cluster 5 refcount=0 reference=1
9ae3a8
-Repairing cluster 6 refcount=0 reference=1
9ae3a8
+ERROR cluster 5 refcount=0 reference=1
9ae3a8
+ERROR cluster 6 refcount=0 reference=1
9ae3a8
+Rebuilding refcount structure
9ae3a8
+Repairing cluster 1 refcount=1 reference=0
9ae3a8
+Repairing cluster 2 refcount=1 reference=0
9ae3a8
 magic                     0x514649fb
9ae3a8
 version                   3
9ae3a8
 backing_file_offset       0x0
9ae3a8
@@ -241,7 +247,7 @@ size                      67108864
9ae3a8
 crypt_method              0
9ae3a8
 l1_size                   1
9ae3a8
 l1_table_offset           0x30000
9ae3a8
-refcount_table_offset     0x10000
9ae3a8
+refcount_table_offset     0x80000
9ae3a8
 refcount_table_clusters   1
9ae3a8
 nb_snapshots              0
9ae3a8
 snapshot_offset           0x0
9ae3a8
-- 
9ae3a8
1.8.3.1
9ae3a8