Kevin Wolf | 76b90e2 | 2019-02-22 11:45:50 +0100 | [diff] [blame] | 1 | QA output created by 244 |
| 2 | |
| 3 | === Create and open image with external data file === |
| 4 | |
| 5 | With data file name in the image: |
| 6 | Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 data_file=TEST_DIR/t.IMGFMT.data |
| 7 | No errors were found on the image. |
| 8 | read 65536/65536 bytes at offset 0 |
| 9 | 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
| 10 | read 65536/65536 bytes at offset 0 |
| 11 | 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
Thomas Huth | 36b9986 | 2019-04-28 17:54:44 +0200 | [diff] [blame] | 12 | qemu-io: can't open device TEST_DIR/t.qcow2: Could not open 'inexistent': No such file or directory |
Kevin Wolf | 76b90e2 | 2019-02-22 11:45:50 +0100 | [diff] [blame] | 13 | no file open, try 'help open' |
| 14 | |
| 15 | Data file required, but without data file name in the image: |
Thomas Huth | 36b9986 | 2019-04-28 17:54:44 +0200 | [diff] [blame] | 16 | qemu-io: can't open device TEST_DIR/t.qcow2: 'data-file' is required for this image |
Kevin Wolf | 76b90e2 | 2019-02-22 11:45:50 +0100 | [diff] [blame] | 17 | no file open, try 'help open' |
| 18 | read 65536/65536 bytes at offset 0 |
| 19 | 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
Thomas Huth | 36b9986 | 2019-04-28 17:54:44 +0200 | [diff] [blame] | 20 | qemu-io: can't open device TEST_DIR/t.qcow2: Could not open 'inexistent': No such file or directory |
Kevin Wolf | 76b90e2 | 2019-02-22 11:45:50 +0100 | [diff] [blame] | 21 | no file open, try 'help open' |
| 22 | |
| 23 | Setting data-file for an image with internal data: |
| 24 | Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 |
Thomas Huth | 36b9986 | 2019-04-28 17:54:44 +0200 | [diff] [blame] | 25 | qemu-io: can't open device TEST_DIR/t.qcow2: 'data-file' can only be set for images with an external data file |
Kevin Wolf | 76b90e2 | 2019-02-22 11:45:50 +0100 | [diff] [blame] | 26 | no file open, try 'help open' |
Thomas Huth | 36b9986 | 2019-04-28 17:54:44 +0200 | [diff] [blame] | 27 | qemu-io: can't open device TEST_DIR/t.qcow2: Could not open 'inexistent': No such file or directory |
Kevin Wolf | 76b90e2 | 2019-02-22 11:45:50 +0100 | [diff] [blame] | 28 | no file open, try 'help open' |
| 29 | |
| 30 | === Conflicting features === |
| 31 | |
| 32 | Convert to compressed target with data file: |
| 33 | Formatting 'TEST_DIR/t.IMGFMT.src', fmt=IMGFMT size=67108864 |
| 34 | wrote 1048576/1048576 bytes at offset 0 |
| 35 | 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
Eric Blake | 39f77cb | 2020-04-02 08:57:17 -0500 | [diff] [blame] | 36 | qemu-img: error while writing at byte 0: Operation not supported |
Kevin Wolf | 76b90e2 | 2019-02-22 11:45:50 +0100 | [diff] [blame] | 37 | |
| 38 | Convert uncompressed, then write compressed data manually: |
| 39 | Images are identical. |
| 40 | write failed: Operation not supported |
| 41 | No errors were found on the image. |
| 42 | |
| 43 | Take an internal snapshot: |
Michael Tokarev | b0a6620 | 2023-08-11 14:09:46 +0300 | [diff] [blame] | 44 | qemu-img: Could not create snapshot 'test': Operation not supported |
Kevin Wolf | 76b90e2 | 2019-02-22 11:45:50 +0100 | [diff] [blame] | 45 | No errors were found on the image. |
| 46 | |
| 47 | === Standalone image with external data file (efficient) === |
| 48 | |
| 49 | Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 data_file=TEST_DIR/t.IMGFMT.data |
| 50 | qcow2 file size before I/O: 196616 |
| 51 | |
| 52 | wrote 4194304/4194304 bytes at offset 1048576 |
| 53 | 4 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
| 54 | discard 2097152/2097152 bytes at offset 2097152 |
| 55 | 2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
| 56 | wrote 3145728/3145728 bytes at offset 3145728 |
| 57 | 3 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
| 58 | No errors were found on the image. |
| 59 | |
Andrey Drobyshev via | 52b10c9 | 2023-09-08 00:02:26 +0300 | [diff] [blame] | 60 | [{ "start": 0, "length": 1048576, "depth": 0, "present": false, "zero": true, "data": false, "compressed": false}, |
| 61 | { "start": 1048576, "length": 1048576, "depth": 0, "present": true, "zero": false, "data": true, "compressed": false, "offset": 1048576}, |
| 62 | { "start": 2097152, "length": 2097152, "depth": 0, "present": true, "zero": true, "data": false, "compressed": false}, |
| 63 | { "start": 4194304, "length": 1048576, "depth": 0, "present": true, "zero": true, "data": false, "compressed": false, "offset": 4194304}, |
| 64 | { "start": 5242880, "length": 1048576, "depth": 0, "present": true, "zero": true, "data": false, "compressed": false}, |
| 65 | { "start": 6291456, "length": 60817408, "depth": 0, "present": false, "zero": true, "data": false, "compressed": false}] |
Kevin Wolf | 76b90e2 | 2019-02-22 11:45:50 +0100 | [diff] [blame] | 66 | |
| 67 | read 1048576/1048576 bytes at offset 0 |
| 68 | 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
| 69 | read 1048576/1048576 bytes at offset 1048576 |
| 70 | 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
| 71 | read 4194304/4194304 bytes at offset 2097152 |
| 72 | 4 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
| 73 | |
| 74 | read 1048576/1048576 bytes at offset 0 |
| 75 | 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
| 76 | read 1048576/1048576 bytes at offset 1048576 |
| 77 | 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
Kevin Wolf | 76b90e2 | 2019-02-22 11:45:50 +0100 | [diff] [blame] | 78 | read 1048576/1048576 bytes at offset 4194304 |
| 79 | 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
| 80 | read 1048576/1048576 bytes at offset 5242880 |
| 81 | 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
| 82 | qcow2 file size after I/O: 327680 |
| 83 | |
| 84 | === Standalone image with external data file (valid raw) === |
| 85 | |
| 86 | Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 data_file=TEST_DIR/t.IMGFMT.data data_file_raw=on |
Max Reitz | 4841082 | 2021-03-26 15:55:08 +0100 | [diff] [blame] | 87 | qcow2 file size before I/O: 327680 |
Kevin Wolf | 76b90e2 | 2019-02-22 11:45:50 +0100 | [diff] [blame] | 88 | |
| 89 | wrote 4194304/4194304 bytes at offset 1048576 |
| 90 | 4 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
| 91 | discard 2097152/2097152 bytes at offset 2097152 |
| 92 | 2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
| 93 | wrote 3145728/3145728 bytes at offset 3145728 |
| 94 | 3 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
| 95 | No errors were found on the image. |
| 96 | |
Andrey Drobyshev via | 52b10c9 | 2023-09-08 00:02:26 +0300 | [diff] [blame] | 97 | [{ "start": 0, "length": 2097152, "depth": 0, "present": true, "zero": false, "data": true, "compressed": false, "offset": 0}, |
| 98 | { "start": 2097152, "length": 2097152, "depth": 0, "present": true, "zero": true, "data": false, "compressed": false}, |
| 99 | { "start": 4194304, "length": 2097152, "depth": 0, "present": true, "zero": true, "data": false, "compressed": false, "offset": 4194304}, |
| 100 | { "start": 6291456, "length": 60817408, "depth": 0, "present": true, "zero": false, "data": true, "compressed": false, "offset": 6291456}] |
Kevin Wolf | 76b90e2 | 2019-02-22 11:45:50 +0100 | [diff] [blame] | 101 | |
| 102 | read 1048576/1048576 bytes at offset 0 |
| 103 | 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
| 104 | read 1048576/1048576 bytes at offset 1048576 |
| 105 | 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
| 106 | read 4194304/4194304 bytes at offset 2097152 |
| 107 | 4 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
| 108 | |
Paolo Bonzini | 3fb6108 | 2020-04-09 15:10:06 -0400 | [diff] [blame] | 109 | read 1048576/1048576 bytes at offset 0 |
| 110 | 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
| 111 | read 1048576/1048576 bytes at offset 1048576 |
| 112 | 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
| 113 | read 3145728/3145728 bytes at offset 3145728 |
| 114 | 3 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
Kevin Wolf | 76b90e2 | 2019-02-22 11:45:50 +0100 | [diff] [blame] | 115 | qcow2 file size after I/O: 327680 |
| 116 | |
| 117 | === bdrv_co_block_status test for file and offset=0 === |
| 118 | |
| 119 | Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 data_file=TEST_DIR/t.IMGFMT.data |
| 120 | wrote 1048576/1048576 bytes at offset 0 |
| 121 | 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
| 122 | read 1048576/1048576 bytes at offset 0 |
| 123 | 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
| 124 | Offset Length Mapped to File |
| 125 | 0 0x100000 0 TEST_DIR/t.qcow2.data |
Andrey Drobyshev via | 52b10c9 | 2023-09-08 00:02:26 +0300 | [diff] [blame] | 126 | [{ "start": 0, "length": 1048576, "depth": 0, "present": true, "zero": false, "data": true, "compressed": false, "offset": 0}, |
| 127 | { "start": 1048576, "length": 66060288, "depth": 0, "present": false, "zero": true, "data": false, "compressed": false}] |
Kevin Wolf | a0cf8da | 2020-02-11 10:49:00 +0100 | [diff] [blame] | 128 | |
| 129 | === Copy offloading === |
| 130 | |
| 131 | Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 data_file=TEST_DIR/t.IMGFMT.data |
| 132 | Images are identical. |
| 133 | Images are identical. |
Max Reitz | c365625 | 2019-11-13 17:26:07 +0100 | [diff] [blame] | 134 | |
| 135 | === Flushing should flush the data file === |
| 136 | |
| 137 | wrote 512/512 bytes at offset 0 |
| 138 | 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
| 139 | |
| 140 | Success: qemu-io failed, so the data file was flushed |
Max Reitz | 2ec7e8a | 2021-03-26 15:55:09 +0100 | [diff] [blame] | 141 | |
| 142 | === Preallocation with data-file-raw === |
| 143 | |
| 144 | --- Using a non-zeroed data file --- |
| 145 | wrote 1048576/1048576 bytes at offset 0 |
| 146 | 1 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 | |
| 169 | Comparing pattern: |
| 170 | read 1048576/1048576 bytes at offset 0 |
| 171 | 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
| 172 | read 1048576/1048576 bytes at offset 0 |
| 173 | 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
| 174 | Images are identical. |
| 175 | |
| 176 | --- Truncation (growing) --- |
| 177 | wrote 1048576/1048576 bytes at offset 1048576 |
| 178 | 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
| 179 | Image resized. |
| 180 | |
| 181 | Comparing pattern: |
| 182 | read 1048576/1048576 bytes at offset 0 |
| 183 | 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
| 184 | read 1048576/1048576 bytes at offset 1048576 |
| 185 | 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
| 186 | read 1048576/1048576 bytes at offset 0 |
| 187 | 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
| 188 | read 1048576/1048576 bytes at offset 1048576 |
| 189 | 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
| 190 | Images are identical. |
| 191 | |
| 192 | --- Giving a backing file at runtime --- |
| 193 | Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576 data_file=TEST_DIR/t.IMGFMT.data data_file_raw=on |
| 194 | Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=1048576 |
| 195 | wrote 1048576/1048576 bytes at offset 0 |
| 196 | 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) |
| 197 | |
| 198 | Comparing qcow2 image and raw data file: |
| 199 | Images are identical. |
Kevin Wolf | 76b90e2 | 2019-02-22 11:45:50 +0100 | [diff] [blame] | 200 | *** done |