xref: /openbmc/qemu/tests/qemu-iotests/242.out (revision 51b19950)
1Test 1
2{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": false, "granularity": 16384, "name": "bitmap-0", "node": "drive0", "persistent": false}}
3{"return": {}}
4wrote 262144/262144 bytes at offset 0
5256 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
6
7qemu-img info dump:
8
9image: TEST_IMG
10file format: IMGFMT
11virtual size: 1 MiB (1048576 bytes)
12cluster_size: 65536
13Format specific information:
14    compat: 1.1
15    compression type: zlib
16    lazy refcounts: false
17    refcount bits: 16
18    corrupt: false
19
20No bitmap in JSON format output
21
22Test 2
23{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": true, "granularity": 32768, "name": "bitmap-1", "node": "drive0", "persistent": true}}
24{"return": {}}
25wrote 262144/262144 bytes at offset 262144
26256 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
27
28qemu-img info dump:
29
30image: TEST_IMG
31file format: IMGFMT
32virtual size: 1 MiB (1048576 bytes)
33cluster_size: 65536
34Format specific information:
35    compat: 1.1
36    compression type: zlib
37    lazy refcounts: false
38    bitmaps:
39        [0]:
40            flags:
41            name: bitmap-1
42            granularity: 32768
43    refcount bits: 16
44    corrupt: false
45
46The same bitmaps in JSON format:
47[
48  {
49    "flags": [],
50    "granularity": 32768,
51    "name": "bitmap-1"
52  }
53]
54
55Test 3
56{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": false, "granularity": 65536, "name": "bitmap-2", "node": "drive0", "persistent": true}}
57{"return": {}}
58wrote 262144/262144 bytes at offset 524288
59256 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
60
61qemu-img info dump:
62
63image: TEST_IMG
64file format: IMGFMT
65virtual size: 1 MiB (1048576 bytes)
66cluster_size: 65536
67Format specific information:
68    compat: 1.1
69    compression type: zlib
70    lazy refcounts: false
71    bitmaps:
72        [0]:
73            flags:
74            name: bitmap-1
75            granularity: 32768
76        [1]:
77            flags:
78                [0]: auto
79            name: bitmap-2
80            granularity: 65536
81    refcount bits: 16
82    corrupt: false
83
84The same bitmaps in JSON format:
85[
86  {
87    "flags": [],
88    "granularity": 32768,
89    "name": "bitmap-1"
90  },
91  {
92    "flags": [
93      "auto"
94    ],
95    "granularity": 65536,
96    "name": "bitmap-2"
97  }
98]
99
100Test 4
101Checking "in-use" flag...
102qemu-img info dump:
103
104image: TEST_IMG
105file format: IMGFMT
106virtual size: 1 MiB (1048576 bytes)
107cluster_size: 65536
108Format specific information:
109    compat: 1.1
110    compression type: zlib
111    lazy refcounts: false
112    bitmaps:
113        [0]:
114            flags:
115                [0]: in-use
116            name: bitmap-1
117            granularity: 32768
118        [1]:
119            flags:
120                [0]: in-use
121                [1]: auto
122            name: bitmap-2
123            granularity: 65536
124    refcount bits: 16
125    corrupt: false
126
127The same bitmaps in JSON format:
128[
129  {
130    "flags": [
131      "in-use"
132    ],
133    "granularity": 32768,
134    "name": "bitmap-1"
135  },
136  {
137    "flags": [
138      "in-use",
139      "auto"
140    ],
141    "granularity": 65536,
142    "name": "bitmap-2"
143  }
144]
145
146Test 5
147{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": false, "granularity": 16384, "name": "bitmap-0", "node": "drive0", "persistent": true}}
148{"return": {}}
149Write an unknown bitmap flag '0x4' into a new QCOW2 image at offset 327695
150qemu-img: Could not open 'TEST_IMG': Bitmap 'bitmap-0' doesn't satisfy the constraints
151
152Unset the unknown bitmap flag '0x4' in the bitmap directory entry:
153
154image: TEST_IMG
155file format: IMGFMT
156virtual size: 1 MiB (1048576 bytes)
157cluster_size: 65536
158Format specific information:
159    compat: 1.1
160    compression type: zlib
161    lazy refcounts: false
162    bitmaps:
163        [0]:
164            flags:
165                [0]: auto
166            name: bitmap-0
167            granularity: 16384
168    refcount bits: 16
169    corrupt: false
170
171Test complete
172