aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/242.out
blob: 091b9126ce45e84b4b85d3f5f0f65e6bc39a56b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
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 MiB (1048576 bytes)
cluster_size: 65536
Format specific information:
    compat: 1.1
    compression type: zlib
    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 MiB (1048576 bytes)
cluster_size: 65536
Format specific information:
    compat: 1.1
    compression type: zlib
    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 MiB (1048576 bytes)
cluster_size: 65536
Format specific information:
    compat: 1.1
    compression type: zlib
    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 MiB (1048576 bytes)
cluster_size: 65536
Format specific information:
    compat: 1.1
    compression type: zlib
    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 MiB (1048576 bytes)
cluster_size: 65536
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    bitmaps:
        [0]:
            flags:
                [0]: auto
            name: bitmap-0
            granularity: 16384
    refcount bits: 16
    corrupt: false

Test complete