1QA output created by 244 2 3=== Create and open image with external data file === 4 5With data file name in the image: 6Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 data_file=TEST_DIR/t.IMGFMT.data 7No errors were found on the image. 8read 65536/65536 bytes at offset 0 964 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 10read 65536/65536 bytes at offset 0 1164 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 12qemu-io: can't open device TEST_DIR/t.qcow2: Could not open 'inexistent': No such file or directory 13no file open, try 'help open' 14 15Data file required, but without data file name in the image: 16qemu-io: can't open device TEST_DIR/t.qcow2: 'data-file' is required for this image 17no file open, try 'help open' 18read 65536/65536 bytes at offset 0 1964 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 20qemu-io: can't open device TEST_DIR/t.qcow2: Could not open 'inexistent': No such file or directory 21no file open, try 'help open' 22 23Setting data-file for an image with internal data: 24Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 25qemu-io: can't open device TEST_DIR/t.qcow2: 'data-file' can only be set for images with an external data file 26no file open, try 'help open' 27qemu-io: can't open device TEST_DIR/t.qcow2: Could not open 'inexistent': No such file or directory 28no file open, try 'help open' 29 30=== Conflicting features === 31 32Convert to compressed target with data file: 33Formatting 'TEST_DIR/t.IMGFMT.src', fmt=IMGFMT size=67108864 34wrote 1048576/1048576 bytes at offset 0 351 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 36qemu-img: error while writing at byte 0: Operation not supported 37 38Convert uncompressed, then write compressed data manually: 39Images are identical. 40write failed: Operation not supported 41No errors were found on the image. 42 43Take an internal snapshot: 44qemu-img: Could not create snapshot 'test': -95 (Operation not supported) 45No errors were found on the image. 46 47=== Standalone image with external data file (efficient) === 48 49Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 data_file=TEST_DIR/t.IMGFMT.data 50qcow2 file size before I/O: 196616 51 52wrote 4194304/4194304 bytes at offset 1048576 534 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 54discard 2097152/2097152 bytes at offset 2097152 552 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 56wrote 3145728/3145728 bytes at offset 3145728 573 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 58No errors were found on the image. 59 60[{ "start": 0, "length": 1048576, "depth": 0, "present": false, "zero": true, "data": false}, 61{ "start": 1048576, "length": 1048576, "depth": 0, "present": true, "zero": false, "data": true, "offset": 1048576}, 62{ "start": 2097152, "length": 2097152, "depth": 0, "present": true, "zero": true, "data": false}, 63{ "start": 4194304, "length": 1048576, "depth": 0, "present": true, "zero": true, "data": false, "offset": 4194304}, 64{ "start": 5242880, "length": 1048576, "depth": 0, "present": true, "zero": true, "data": false}, 65{ "start": 6291456, "length": 60817408, "depth": 0, "present": false, "zero": true, "data": false}] 66 67read 1048576/1048576 bytes at offset 0 681 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 69read 1048576/1048576 bytes at offset 1048576 701 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 71read 4194304/4194304 bytes at offset 2097152 724 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 73 74read 1048576/1048576 bytes at offset 0 751 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 76read 1048576/1048576 bytes at offset 1048576 771 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 78read 1048576/1048576 bytes at offset 4194304 791 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 80read 1048576/1048576 bytes at offset 5242880 811 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 82qcow2 file size after I/O: 327680 83 84=== Standalone image with external data file (valid raw) === 85 86Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 data_file=TEST_DIR/t.IMGFMT.data data_file_raw=on 87qcow2 file size before I/O: 327680 88 89wrote 4194304/4194304 bytes at offset 1048576 904 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 91discard 2097152/2097152 bytes at offset 2097152 922 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 93wrote 3145728/3145728 bytes at offset 3145728 943 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 95No errors were found on the image. 96 97[{ "start": 0, "length": 2097152, "depth": 0, "present": true, "zero": false, "data": true, "offset": 0}, 98{ "start": 2097152, "length": 2097152, "depth": 0, "present": true, "zero": true, "data": false}, 99{ "start": 4194304, "length": 2097152, "depth": 0, "present": true, "zero": true, "data": false, "offset": 4194304}, 100{ "start": 6291456, "length": 60817408, "depth": 0, "present": true, "zero": false, "data": true, "offset": 6291456}] 101 102read 1048576/1048576 bytes at offset 0 1031 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 104read 1048576/1048576 bytes at offset 1048576 1051 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 106read 4194304/4194304 bytes at offset 2097152 1074 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 108 109read 1048576/1048576 bytes at offset 0 1101 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 111read 1048576/1048576 bytes at offset 1048576 1121 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 113read 3145728/3145728 bytes at offset 3145728 1143 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 115qcow2 file size after I/O: 327680 116 117=== bdrv_co_block_status test for file and offset=0 === 118 119Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 data_file=TEST_DIR/t.IMGFMT.data 120wrote 1048576/1048576 bytes at offset 0 1211 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 122read 1048576/1048576 bytes at offset 0 1231 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 124Offset Length Mapped to File 1250 0x100000 0 TEST_DIR/t.qcow2.data 126[{ "start": 0, "length": 1048576, "depth": 0, "present": true, "zero": false, "data": true, "offset": 0}, 127{ "start": 1048576, "length": 66060288, "depth": 0, "present": false, "zero": true, "data": false}] 128 129=== Copy offloading === 130 131Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 data_file=TEST_DIR/t.IMGFMT.data 132Images are identical. 133Images are identical. 134 135=== Flushing should flush the data file === 136 137wrote 512/512 bytes at offset 0 138512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 139 140Success: qemu-io failed, so the data file was flushed 141 142=== Preallocation with data-file-raw === 143 144--- Using a non-zeroed data file --- 145wrote 1048576/1048576 bytes at offset 0 1461 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 147{ "execute": "qmp_capabilities" } 148{"return": {}} 149{ "execute": "blockdev-create", 150 "arguments": { 151 "job-id": "create", 152 "options": { 153 "driver": "IMGFMT", 154 "size": 1048576, 155 "file": "meta", 156 "data-file": "data", 157 "data-file-raw": true 158 } } } 159{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "create"}} 160{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "create"}} 161{"return": {}} 162{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "create"}} 163{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "pending", "id": "create"}} 164{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "create"}} 165{ "execute": "job-dismiss", "arguments": { "id": "create" } } 166{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "create"}} 167{"return": {}} 168 169Comparing pattern: 170read 1048576/1048576 bytes at offset 0 1711 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 172read 1048576/1048576 bytes at offset 0 1731 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 174Images are identical. 175 176--- Truncation (growing) --- 177wrote 1048576/1048576 bytes at offset 1048576 1781 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 179Image resized. 180 181Comparing pattern: 182read 1048576/1048576 bytes at offset 0 1831 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 184read 1048576/1048576 bytes at offset 1048576 1851 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 186read 1048576/1048576 bytes at offset 0 1871 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 188read 1048576/1048576 bytes at offset 1048576 1891 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 190Images are identical. 191 192--- Giving a backing file at runtime --- 193Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576 data_file=TEST_DIR/t.IMGFMT.data data_file_raw=on 194Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=1048576 195wrote 1048576/1048576 bytes at offset 0 1961 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 197 198Comparing qcow2 image and raw data file: 199Images are identical. 200*** done 201