| 1 | QA output created by 308 |
| 2 | === Set up === |
| 3 | Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 |
| 4 | wrote 67108864/67108864 bytes at offset 0 |
| 5 | 64 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
| 6 | {'execute': 'qmp_capabilities'} |
| 7 | {"return": {}} |
| 8 | {'execute': 'blockdev-add', |
| 9 | 'arguments': { |
| 10 | 'driver': 'file', |
| 11 | 'node-name': 'node-protocol', |
| 12 | 'filename': 'TEST_DIR/t.IMGFMT' |
| 13 | } } |
| 14 | {"return": {}} |
| 15 | {'execute': 'blockdev-add', |
| 16 | 'arguments': { |
| 17 | 'driver': 'IMGFMT', |
| 18 | 'node-name': 'node-format', |
| 19 | 'file': 'node-protocol' |
| 20 | } } |
| 21 | {"return": {}} |
| 22 | |
| 23 | === Mountpoint not present === |
| 24 | {'execute': 'block-export-add', |
| 25 | 'arguments': { |
| 26 | 'type': 'fuse', |
| 27 | 'id': 'export-err', |
| 28 | 'node-name': 'node-format', |
| 29 | 'mountpoint': 'TEST_DIR/t.IMGFMT.fuse' |
| 30 | } } |
| 31 | {"error": {"class": "GenericError", "desc": "Failed to stat 'TEST_DIR/t.IMGFMT.fuse': No such file or directory"}} |
| 32 | |
| 33 | === Mountpoint is a directory === |
| 34 | {'execute': 'block-export-add', |
| 35 | 'arguments': { |
| 36 | 'type': 'fuse', |
| 37 | 'id': 'export-err', |
| 38 | 'node-name': 'node-format', |
| 39 | 'mountpoint': 'TEST_DIR/t.IMGFMT.fuse' |
| 40 | } } |
| 41 | {"error": {"class": "GenericError", "desc": "'TEST_DIR/t.IMGFMT.fuse' is not a regular file"}} |
| 42 | |
| 43 | === Mountpoint is a regular file === |
| 44 | {'execute': 'block-export-add', |
| 45 | 'arguments': { |
| 46 | 'type': 'fuse', |
| 47 | 'id': 'export-mp', |
| 48 | 'node-name': 'node-format', |
| 49 | 'mountpoint': 'TEST_DIR/t.IMGFMT.fuse' |
| 50 | } } |
| 51 | {"return": {}} |
| 52 | Images are identical. |
| 53 | Permissions pre-chmod: 400 |
| 54 | chmod: changing permissions of 'TEST_DIR/t.IMGFMT.fuse': Read-only file system |
| 55 | Permissions post-+w: 400 |
| 56 | chmod: changing permissions of 'TEST_DIR/t.IMGFMT.fuse': Read-only file system |
| 57 | Permissions post-+x: 400 |
| 58 | |
| 59 | === Mount over existing file === |
| 60 | {'execute': 'block-export-add', |
| 61 | 'arguments': { |
| 62 | 'type': 'fuse', |
| 63 | 'id': 'export-img', |
| 64 | 'node-name': 'node-format', |
| 65 | 'mountpoint': 'TEST_DIR/t.IMGFMT' |
| 66 | } } |
| 67 | {"return": {}} |
| 68 | Images are identical. |
| 69 | |
| 70 | === Double export === |
| 71 | {'execute': 'block-export-add', |
| 72 | 'arguments': { |
| 73 | 'type': 'fuse', |
| 74 | 'id': 'export-err', |
| 75 | 'node-name': 'node-format', |
| 76 | 'mountpoint': 'TEST_DIR/t.IMGFMT.fuse' |
| 77 | } } |
| 78 | {"error": {"class": "GenericError", "desc": "There already is a FUSE export on 'TEST_DIR/t.IMGFMT.fuse'"}} |
| 79 | |
| 80 | === Remove export === |
| 81 | virtual size: 64 MiB (67108864 bytes) |
| 82 | {'execute': 'block-export-del', |
| 83 | 'arguments': { |
| 84 | 'id': 'export-mp' |
| 85 | } } |
| 86 | {"return": {}} |
| 87 | {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_EXPORT_DELETED", "data": {"id": "export-mp"}} |
| 88 | virtual size: 0 B (0 bytes) |
| 89 | |
| 90 | === Writable export === |
| 91 | {'execute': 'block-export-add', |
| 92 | 'arguments': { |
| 93 | 'type': 'fuse', |
| 94 | 'id': 'export-mp', |
| 95 | 'node-name': 'node-format', |
| 96 | 'mountpoint': 'TEST_DIR/t.IMGFMT.fuse', 'writable': true |
| 97 | } } |
| 98 | {"return": {}} |
| 99 | Writing to read-only export failed: OK |
| 100 | wrote 65536/65536 bytes at offset 1048576 |
| 101 | 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
| 102 | wrote 65536/65536 bytes at offset 1048576 |
| 103 | 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
| 104 | |
| 105 | === Resizing exports === |
| 106 | {'execute': 'block-export-del', |
| 107 | 'arguments': { |
| 108 | 'id': 'export-mp' |
| 109 | } } |
| 110 | {"return": {}} |
| 111 | {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_EXPORT_DELETED", "data": {"id": "export-mp"}} |
| 112 | {'execute': 'block-export-del', |
| 113 | 'arguments': { |
| 114 | 'id': 'export-img' |
| 115 | } } |
| 116 | {"return": {}} |
| 117 | {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_EXPORT_DELETED", "data": {"id": "export-img"}} |
| 118 | {'execute': 'blockdev-del', |
| 119 | 'arguments': { |
| 120 | 'node-name': 'node-format' |
| 121 | } } |
| 122 | {"return": {}} |
| 123 | {'execute': 'block-export-add', |
| 124 | 'arguments': { |
| 125 | 'type': 'fuse', |
| 126 | 'id': 'export-mp', |
| 127 | 'node-name': 'node-protocol', |
| 128 | 'mountpoint': 'TEST_DIR/t.IMGFMT.fuse', 'writable': true |
| 129 | } } |
| 130 | {"return": {}} |
| 131 | |
| 132 | --- Try growing non-growable export --- |
| 133 | (OK: Lengths of export and original are the same) |
| 134 | dd: error writing 'TEST_DIR/t.IMGFMT.fuse': No space left on device |
| 135 | 1+0 records in |
| 136 | 0+0 records out |
| 137 | dd: error writing 'TEST_DIR/t.IMGFMT.fuse': No space left on device |
| 138 | 1+0 records in |
| 139 | 0+0 records out |
| 140 | 32768+0 records in |
| 141 | 32768+0 records out |
| 142 | dd: TEST_DIR/t.IMGFMT.fuse: cannot skip to specified offset |
| 143 | 0+0 records in |
| 144 | 0+0 records out |
| 145 | |
| 146 | --- Resize export --- |
| 147 | (OK: Lengths of export and original are the same) |
| 148 | OK: Post-truncate image size is as expected |
| 149 | OK: Disk usage grew with fallocate |
| 150 | 0+1 records in |
| 151 | 0+1 records out |
| 152 | |
| 153 | --- Try growing growable export --- |
| 154 | {'execute': 'block-export-del', |
| 155 | 'arguments': { |
| 156 | 'id': 'export-mp' |
| 157 | } } |
| 158 | {"return": {}} |
| 159 | {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_EXPORT_DELETED", "data": {"id": "export-mp"}} |
| 160 | {'execute': 'block-export-add', |
| 161 | 'arguments': { |
| 162 | 'type': 'fuse', |
| 163 | 'id': 'export-mp', |
| 164 | 'node-name': 'node-protocol', |
| 165 | 'mountpoint': 'TEST_DIR/t.IMGFMT.fuse', 'writable': true, 'growable': true |
| 166 | } } |
| 167 | {"return": {}} |
| 168 | 65536+0 records in |
| 169 | 65536+0 records out |
| 170 | (OK: Lengths of export and original are the same) |
| 171 | OK: Post-grow image size is as expected |
| 172 | |
| 173 | --- Shrink export --- |
| 174 | (OK: Lengths of export and original are the same) |
| 175 | OK: Post-truncate image size is as expected |
| 176 | |
| 177 | === Tear down === |
| 178 | {'execute': 'quit'} |
| 179 | {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} |
| 180 | {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_EXPORT_DELETED", "data": {"id": "export-mp"}} |
| 181 | {"return": {}} |
| 182 | |
| 183 | === Compare copy with original === |
| 184 | Images are identical. |
| 185 | |
| 186 | === Writing zeroes while unmapping === |
| 187 | Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 |
| 188 | wrote 67108864/67108864 bytes at offset 0 |
| 189 | 64 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
| 190 | {'execute': 'qmp_capabilities'} |
| 191 | {"return": {}} |
| 192 | {'execute': 'blockdev-add', |
| 193 | 'arguments': { |
| 194 | 'driver': 'IMGFMT', |
| 195 | 'node-name': 'node-format', |
| 196 | 'file': { |
| 197 | 'driver': 'file', |
| 198 | 'filename': 'TEST_DIR/t.IMGFMT' |
| 199 | } |
| 200 | } } |
| 201 | {"return": {}} |
| 202 | {'execute': 'block-export-add', |
| 203 | 'arguments': { |
| 204 | 'type': 'fuse', |
| 205 | 'id': 'export', |
| 206 | 'node-name': 'node-format', |
| 207 | 'mountpoint': 'TEST_DIR/t.IMGFMT.fuse', 'writable': true |
| 208 | } } |
| 209 | {"return": {}} |
| 210 | wrote 67108864/67108864 bytes at offset 0 |
| 211 | 64 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
| 212 | read 67108864/67108864 bytes at offset 0 |
| 213 | 64 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
| 214 | {'execute': 'quit'} |
| 215 | {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} |
| 216 | {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_EXPORT_DELETED", "data": {"id": "export"}} |
| 217 | {"return": {}} |
| 218 | read 67108864/67108864 bytes at offset 0 |
| 219 | 64 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
| 220 | |
| 221 | === Multi-threading === |
| 222 | {'execute': 'qmp_capabilities'} |
| 223 | {"return": {}} |
| 224 | {'execute': 'blockdev-add', |
| 225 | 'arguments': { |
| 226 | 'driver': 'null-co', |
| 227 | 'node-name': 'null' |
| 228 | } } |
| 229 | {"return": {}} |
| 230 | {'execute': 'object-add', |
| 231 | 'arguments': { |
| 232 | 'qom-type': 'iothread', |
| 233 | 'id': 'iothread0' |
| 234 | } } |
| 235 | {"return": {}} |
| 236 | {'execute': 'object-add', |
| 237 | 'arguments': { |
| 238 | 'qom-type': 'iothread', |
| 239 | 'id': 'iothread1' |
| 240 | } } |
| 241 | {"return": {}} |
| 242 | {'execute': 'object-add', |
| 243 | 'arguments': { |
| 244 | 'qom-type': 'iothread', |
| 245 | 'id': 'iothread2' |
| 246 | } } |
| 247 | {"return": {}} |
| 248 | {'execute': 'object-add', |
| 249 | 'arguments': { |
| 250 | 'qom-type': 'iothread', |
| 251 | 'id': 'iothread3' |
| 252 | } } |
| 253 | {"return": {}} |
| 254 | |
| 255 | {'execute': 'block-export-add', |
| 256 | 'arguments': { |
| 257 | 'type': 'fuse', |
| 258 | 'id': 'export', |
| 259 | 'node-name': 'null', |
| 260 | 'mountpoint': 'TEST_DIR/t.IMGFMT.fuse', 'iothread': ['iothread0', 'iothread1', 'iothread2', 'iothread3'] |
| 261 | } } |
| 262 | {"return": {}} |
| 263 | |
| 264 | Sending 75000 read requests, 4096 bytes each, 64 in parallel (starting at offset 0, step size 4096) |
| 265 | Run completed in X.XXX seconds. |
| 266 | |
| 267 | {'execute': 'block-export-del', |
| 268 | 'arguments': { |
| 269 | 'id': 'export' |
| 270 | } } |
| 271 | {"return": {}} |
| 272 | {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_EXPORT_DELETED", "data": {"id": "export"}} |
| 273 | {'execute': 'quit'} |
| 274 | {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} |
| 275 | {"return": {}} |
| 276 | *** done |