aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/242.out
diff options
context:
space:
mode:
authorAndrey Shinkevich <andrey.shinkevich@virtuozzo.com>2019-02-08 18:06:08 +0300
committerEric Blake <eblake@redhat.com>2019-02-11 14:35:43 -0600
commitddd113beedd22908e676d53803843d2f85bf91ab (patch)
tree9221f570449fe6983510ee7d7482110ddbd63abe /tests/qemu-iotests/242.out
parentb8968c875f4030dd6924d6971bb3d92dfa3d2f65 (diff)
downloadqemu-ddd113beedd22908e676d53803843d2f85bf91ab.zip
qemu-ddd113beedd22908e676d53803843d2f85bf91ab.tar.gz
qemu-ddd113beedd22908e676d53803843d2f85bf91ab.tar.bz2
qcow2: list of bitmaps new test 242
A new test file 242 added to the qemu-iotests set. It checks the format of qcow2 specific information for the new added section that lists details of bitmaps. Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com> Message-Id: <1549638368-530182-4-git-send-email-andrey.shinkevich@virtuozzo.com> Reviewed-by: Eric Blake <eblake@redhat.com> [eblake: pep8 compliance, avoid trailing blank line] Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/242.out')
-rw-r--r--tests/qemu-iotests/242.out166
1 files changed, 166 insertions, 0 deletions
diff --git a/tests/qemu-iotests/242.out b/tests/qemu-iotests/242.out
new file mode 100644
index 0000000..fbe05d7
--- /dev/null
+++ b/tests/qemu-iotests/242.out
@@ -0,0 +1,166 @@
+Test 1
+{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": false, "granularity": 16384, "name": "bitmap-0", "node": "drive0", "persistent": false}}
+{"return": {}}
+wrote 262144/262144 bytes at offset 0
+256 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+
+qemu-img info dump:
+
+image: TEST_IMG
+file format: IMGFMT
+virtual size: 1.0M (1048576 bytes)
+cluster_size: 65536
+Format specific information:
+ compat: 1.1
+ lazy refcounts: false
+ refcount bits: 16
+ corrupt: false
+
+No bitmap in JSON format output
+
+Test 2
+{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": true, "granularity": 32768, "name": "bitmap-1", "node": "drive0", "persistent": true}}
+{"return": {}}
+wrote 262144/262144 bytes at offset 262144
+256 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+
+qemu-img info dump:
+
+image: TEST_IMG
+file format: IMGFMT
+virtual size: 1.0M (1048576 bytes)
+cluster_size: 65536
+Format specific information:
+ compat: 1.1
+ lazy refcounts: false
+ bitmaps:
+ [0]:
+ flags:
+ name: bitmap-1
+ granularity: 32768
+ refcount bits: 16
+ corrupt: false
+
+The same bitmaps in JSON format:
+[
+ {
+ "flags": [],
+ "granularity": 32768,
+ "name": "bitmap-1"
+ }
+]
+
+Test 3
+{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": false, "granularity": 65536, "name": "bitmap-2", "node": "drive0", "persistent": true}}
+{"return": {}}
+wrote 262144/262144 bytes at offset 524288
+256 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+
+qemu-img info dump:
+
+image: TEST_IMG
+file format: IMGFMT
+virtual size: 1.0M (1048576 bytes)
+cluster_size: 65536
+Format specific information:
+ compat: 1.1
+ lazy refcounts: false
+ bitmaps:
+ [0]:
+ flags:
+ name: bitmap-1
+ granularity: 32768
+ [1]:
+ flags:
+ [0]: auto
+ name: bitmap-2
+ granularity: 65536
+ refcount bits: 16
+ corrupt: false
+
+The same bitmaps in JSON format:
+[
+ {
+ "flags": [],
+ "granularity": 32768,
+ "name": "bitmap-1"
+ },
+ {
+ "flags": [
+ "auto"
+ ],
+ "granularity": 65536,
+ "name": "bitmap-2"
+ }
+]
+
+Test 4
+Checking "in-use" flag...
+qemu-img info dump:
+
+image: TEST_IMG
+file format: IMGFMT
+virtual size: 1.0M (1048576 bytes)
+cluster_size: 65536
+Format specific information:
+ compat: 1.1
+ lazy refcounts: false
+ bitmaps:
+ [0]:
+ flags:
+ [0]: in-use
+ name: bitmap-1
+ granularity: 32768
+ [1]:
+ flags:
+ [0]: in-use
+ [1]: auto
+ name: bitmap-2
+ granularity: 65536
+ refcount bits: 16
+ corrupt: false
+
+The same bitmaps in JSON format:
+[
+ {
+ "flags": [
+ "in-use"
+ ],
+ "granularity": 32768,
+ "name": "bitmap-1"
+ },
+ {
+ "flags": [
+ "in-use",
+ "auto"
+ ],
+ "granularity": 65536,
+ "name": "bitmap-2"
+ }
+]
+
+Test 5
+{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": false, "granularity": 16384, "name": "bitmap-0", "node": "drive0", "persistent": true}}
+{"return": {}}
+Write an unknown bitmap flag '0x4' into a new QCOW2 image at offset 327695
+qemu-img: Could not open 'TEST_IMG': Bitmap 'bitmap-0' doesn't satisfy the constraints
+
+Unset the unknown bitmap flag '0x4' in the bitmap directory entry:
+
+image: TEST_IMG
+file format: IMGFMT
+virtual size: 1.0M (1048576 bytes)
+cluster_size: 65536
+Format specific information:
+ compat: 1.1
+ lazy refcounts: false
+ bitmaps:
+ [0]:
+ flags:
+ [0]: auto
+ name: bitmap-0
+ granularity: 16384
+ refcount bits: 16
+ corrupt: false
+
+Test complete