summaryrefslogtreecommitdiffstats
path: root/tests/qemu-iotests
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2015-12-02 18:34:39 +0100
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:28:25 -0600
commit7dca9b8a9d54f8ea4e4a77e334656c7a5679df20 (patch)
tree76bfd36adc120142cdb8af6b0ade10046c83e8cf /tests/qemu-iotests
parent28e84914a01dc250470160327ed17f2a869ee864 (diff)
downloadhqemu-7dca9b8a9d54f8ea4e4a77e334656c7a5679df20.zip
hqemu-7dca9b8a9d54f8ea4e4a77e334656c7a5679df20.tar.gz
qcow2: Write full header on image creation
When creating a qcow2 image, we didn't necessarily call qcow2_update_header(), but could end up with the basic header that qcow2_create2() created manually. One thing that this basic header lacks is the feature table. Let's make sure that it's always present. This requires a few updates to test cases as well. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'tests/qemu-iotests')
-rw-r--r--tests/qemu-iotests/031.out5
-rwxr-xr-xtests/qemu-iotests/0362
-rw-r--r--tests/qemu-iotests/036.out5
-rw-r--r--tests/qemu-iotests/061.out20
4 files changed, 32 insertions, 0 deletions
diff --git a/tests/qemu-iotests/031.out b/tests/qemu-iotests/031.out
index f065404..7f5050b 100644
--- a/tests/qemu-iotests/031.out
+++ b/tests/qemu-iotests/031.out
@@ -116,6 +116,11 @@ refcount_order 4
header_length 104
Header extension:
+magic 0x6803f857
+length 144
+data <binary>
+
+Header extension:
magic 0x12345678
length 31
data 'This is a test header extension'
diff --git a/tests/qemu-iotests/036 b/tests/qemu-iotests/036
index 392f1ef..c4cc91b 100755
--- a/tests/qemu-iotests/036
+++ b/tests/qemu-iotests/036
@@ -57,6 +57,7 @@ _make_test_img 64M
$PYTHON qcow2.py "$TEST_IMG" set-feature-bit incompatible 63
# Without feature table
+$PYTHON qcow2.py "$TEST_IMG" del-header-ext 0x6803f857
$PYTHON qcow2.py "$TEST_IMG" dump-header
_img_info
@@ -73,6 +74,7 @@ $PYTHON qcow2.py "$TEST_IMG" set-feature-bit incompatible 62
$PYTHON qcow2.py "$TEST_IMG" set-feature-bit incompatible 63
# Without feature table
+$PYTHON qcow2.py "$TEST_IMG" del-header-ext 0x6803f857
_img_info
# With feature table containing bit 63
diff --git a/tests/qemu-iotests/036.out b/tests/qemu-iotests/036.out
index 5616e37..f443635 100644
--- a/tests/qemu-iotests/036.out
+++ b/tests/qemu-iotests/036.out
@@ -56,6 +56,11 @@ autoclear_features 0x8000000000000000
refcount_order 4
header_length 104
+Header extension:
+magic 0x6803f857
+length 144
+data <binary>
+
=== Repair image ===
diff --git a/tests/qemu-iotests/061.out b/tests/qemu-iotests/061.out
index d604682..a03732e 100644
--- a/tests/qemu-iotests/061.out
+++ b/tests/qemu-iotests/061.out
@@ -24,6 +24,11 @@ autoclear_features 0x0
refcount_order 4
header_length 104
+Header extension:
+magic 0x6803f857
+length 144
+data <binary>
+
magic 0x514649fb
version 2
backing_file_offset 0x0
@@ -76,6 +81,11 @@ autoclear_features 0x0
refcount_order 4
header_length 104
+Header extension:
+magic 0x6803f857
+length 144
+data <binary>
+
ERROR cluster 5 refcount=0 reference=1
ERROR cluster 6 refcount=0 reference=1
Rebuilding refcount structure
@@ -126,6 +136,11 @@ autoclear_features 0x40000000000
refcount_order 4
header_length 104
+Header extension:
+magic 0x6803f857
+length 144
+data <binary>
+
magic 0x514649fb
version 2
backing_file_offset 0x0
@@ -228,6 +243,11 @@ autoclear_features 0x0
refcount_order 4
header_length 104
+Header extension:
+magic 0x6803f857
+length 144
+data <binary>
+
ERROR cluster 5 refcount=0 reference=1
ERROR cluster 6 refcount=0 reference=1
Rebuilding refcount structure
OpenPOWER on IntegriCloud