mirror of
https://github.com/xemu-project/xemu.git
synced 2024-12-11 05:23:58 +00:00
fe646693ac
This will let us print options in a format that the user would actually write it on the command line (foo=bar,baz=asd,etc=def), without prepending a spurious comma at the beginning of the list, or quoting values unnecessarily. This patch provides the following changes: * write and id=, if the option has an id * do not print separator before the first element * do not quote string arguments * properly escape commas (,) for QEMU Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
210 lines
10 KiB
Plaintext
210 lines
10 KiB
Plaintext
QA output created by 122
|
|
Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=67108864
|
|
wrote 67108864/67108864 bytes at offset 0
|
|
64 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
|
=== Check allocation status regression with -B ===
|
|
|
|
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 backing_file=TEST_DIR/t.IMGFMT.base
|
|
wrote 3145728/3145728 bytes at offset 0
|
|
3 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
Offset Length File
|
|
0 0x300000 TEST_DIR/t.IMGFMT.orig
|
|
0x300000 0x3d00000 TEST_DIR/t.IMGFMT.base
|
|
|
|
=== Check that zero clusters are kept in overlay ===
|
|
|
|
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 backing_file=TEST_DIR/t.IMGFMT.base
|
|
wrote 3145728/3145728 bytes at offset 0
|
|
3 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 3145728/3145728 bytes at offset 0
|
|
3 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 3145728/3145728 bytes at offset 0
|
|
3 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 3145728/3145728 bytes at offset 0
|
|
3 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 3145728/3145728 bytes at offset 0
|
|
3 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 3145728/3145728 bytes at offset 0
|
|
3 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
|
=== Concatenate multiple source images ===
|
|
|
|
Formatting 'TEST_DIR/t.IMGFMT.1', fmt=IMGFMT size=4194304
|
|
Formatting 'TEST_DIR/t.IMGFMT.2', fmt=IMGFMT size=4194304
|
|
Formatting 'TEST_DIR/t.IMGFMT.3', fmt=IMGFMT size=4194304
|
|
wrote 65536/65536 bytes at offset 0
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 65536/65536 bytes at offset 0
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 65536/65536 bytes at offset 0
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
Offset Length File
|
|
0 0x10000 TEST_DIR/t.IMGFMT
|
|
0x400000 0x10000 TEST_DIR/t.IMGFMT
|
|
0x800000 0x10000 TEST_DIR/t.IMGFMT
|
|
read 65536/65536 bytes at offset 0
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 65536/65536 bytes at offset 4194304
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 65536/65536 bytes at offset 8388608
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
[{ "start": 0, "length": 65536, "depth": 0, "zero": false, "data": true},
|
|
{ "start": 65536, "length": 4128768, "depth": 0, "zero": true, "data": false},
|
|
{ "start": 4194304, "length": 65536, "depth": 0, "zero": false, "data": true},
|
|
{ "start": 4259840, "length": 4128768, "depth": 0, "zero": true, "data": false},
|
|
{ "start": 8388608, "length": 65536, "depth": 0, "zero": false, "data": true},
|
|
{ "start": 8454144, "length": 4128768, "depth": 0, "zero": true, "data": false}]
|
|
read 65536/65536 bytes at offset 0
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 65536/65536 bytes at offset 4194304
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 65536/65536 bytes at offset 8388608
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
qemu-img: -B makes no sense when concatenating multiple input images
|
|
qemu-img: -B makes no sense when concatenating multiple input images
|
|
|
|
=== Compression with misaligned allocations and image sizes ===
|
|
|
|
Formatting 'TEST_DIR/t.IMGFMT.1', fmt=IMGFMT size=1047552
|
|
Formatting 'TEST_DIR/t.IMGFMT.2', fmt=IMGFMT size=1047552
|
|
wrote 16384/16384 bytes at offset 16384
|
|
16 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 133120/133120 bytes at offset 133120
|
|
130 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 1024/1024 bytes at offset 1046528
|
|
1 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 1024/1024 bytes at offset 0
|
|
1 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
[{ "start": 0, "length": 65536, "depth": 0, "zero": false, "data": true},
|
|
{ "start": 65536, "length": 65536, "depth": 0, "zero": true, "data": false},
|
|
{ "start": 131072, "length": 196608, "depth": 0, "zero": false, "data": true},
|
|
{ "start": 327680, "length": 655360, "depth": 0, "zero": true, "data": false},
|
|
{ "start": 983040, "length": 65536, "depth": 0, "zero": false, "data": true},
|
|
{ "start": 1048576, "length": 1046528, "depth": 0, "zero": true, "data": false}]
|
|
read 16384/16384 bytes at offset 0
|
|
16 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 16384/16384 bytes at offset 16384
|
|
16 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 100352/100352 bytes at offset 32768
|
|
98 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 133120/133120 bytes at offset 133120
|
|
130 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 780288/780288 bytes at offset 266240
|
|
762 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 1024/1024 bytes at offset 1046528
|
|
1 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 1024/1024 bytes at offset 1047552
|
|
1 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 1046528/1046528 bytes at offset 1048576
|
|
1022 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
|
=== Full allocation with -S 0 ===
|
|
|
|
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
|
|
wrote 3145728/3145728 bytes at offset 0
|
|
3 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 3145728/3145728 bytes at offset 3145728
|
|
3 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
|
convert -S 0:
|
|
read 3145728/3145728 bytes at offset 0
|
|
3 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 63963136/63963136 bytes at offset 3145728
|
|
61 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
[{ "start": 0, "length": 6291456, "depth": 0, "zero": false, "data": true, "offset": 327680},
|
|
{ "start": 6291456, "length": 60817408, "depth": 0, "zero": true, "data": false}]
|
|
|
|
convert -c -S 0:
|
|
read 3145728/3145728 bytes at offset 0
|
|
3 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 63963136/63963136 bytes at offset 3145728
|
|
61 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
[{ "start": 0, "length": 6291456, "depth": 0, "zero": false, "data": true},
|
|
{ "start": 6291456, "length": 60817408, "depth": 0, "zero": true, "data": false}]
|
|
Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=67108864
|
|
wrote 33554432/33554432 bytes at offset 0
|
|
32 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 backing_file=TEST_DIR/t.IMGFMT.base
|
|
wrote 3145728/3145728 bytes at offset 0
|
|
3 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
|
convert -S 0 with source backing file:
|
|
read 3145728/3145728 bytes at offset 0
|
|
3 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 30408704/30408704 bytes at offset 3145728
|
|
29 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 33554432/33554432 bytes at offset 33554432
|
|
32 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
[{ "start": 0, "length": 67108864, "depth": 0, "zero": false, "data": true, "offset": 327680}]
|
|
|
|
convert -c -S 0 with source backing file:
|
|
read 3145728/3145728 bytes at offset 0
|
|
3 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 30408704/30408704 bytes at offset 3145728
|
|
29 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 33554432/33554432 bytes at offset 33554432
|
|
32 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
[{ "start": 0, "length": 67108864, "depth": 0, "zero": false, "data": true}]
|
|
|
|
convert -S 0 -B ...
|
|
read 3145728/3145728 bytes at offset 0
|
|
3 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 30408704/30408704 bytes at offset 3145728
|
|
29 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 33554432/33554432 bytes at offset 33554432
|
|
32 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
[{ "start": 0, "length": 67108864, "depth": 0, "zero": false, "data": true, "offset": 327680}]
|
|
|
|
convert -c -S 0 -B ...
|
|
read 3145728/3145728 bytes at offset 0
|
|
3 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 30408704/30408704 bytes at offset 3145728
|
|
29 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 33554432/33554432 bytes at offset 33554432
|
|
32 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
[{ "start": 0, "length": 67108864, "depth": 0, "zero": false, "data": true}]
|
|
|
|
=== Non-zero -S ===
|
|
|
|
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
|
|
wrote 65536/65536 bytes at offset 0
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 1024/1024 bytes at offset 0
|
|
1 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 1024/1024 bytes at offset 8192
|
|
1 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 1024/1024 bytes at offset 17408
|
|
1 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
|
convert -S 4k
|
|
[{ "start": 0, "length": 1024, "depth": 0, "zero": false, "data": true, "offset": 8192},
|
|
{ "start": 1024, "length": 7168, "depth": 0, "zero": true, "data": false},
|
|
{ "start": 8192, "length": 1024, "depth": 0, "zero": false, "data": true, "offset": 9216},
|
|
{ "start": 9216, "length": 8192, "depth": 0, "zero": true, "data": false},
|
|
{ "start": 17408, "length": 1024, "depth": 0, "zero": false, "data": true, "offset": 10240},
|
|
{ "start": 18432, "length": 67090432, "depth": 0, "zero": true, "data": false}]
|
|
|
|
convert -c -S 4k
|
|
[{ "start": 0, "length": 1024, "depth": 0, "zero": false, "data": true},
|
|
{ "start": 1024, "length": 7168, "depth": 0, "zero": true, "data": false},
|
|
{ "start": 8192, "length": 1024, "depth": 0, "zero": false, "data": true},
|
|
{ "start": 9216, "length": 8192, "depth": 0, "zero": true, "data": false},
|
|
{ "start": 17408, "length": 1024, "depth": 0, "zero": false, "data": true},
|
|
{ "start": 18432, "length": 67090432, "depth": 0, "zero": true, "data": false}]
|
|
|
|
convert -S 8k
|
|
[{ "start": 0, "length": 9216, "depth": 0, "zero": false, "data": true, "offset": 8192},
|
|
{ "start": 9216, "length": 8192, "depth": 0, "zero": true, "data": false},
|
|
{ "start": 17408, "length": 1024, "depth": 0, "zero": false, "data": true, "offset": 17408},
|
|
{ "start": 18432, "length": 67090432, "depth": 0, "zero": true, "data": false}]
|
|
|
|
convert -c -S 8k
|
|
[{ "start": 0, "length": 1024, "depth": 0, "zero": false, "data": true},
|
|
{ "start": 1024, "length": 7168, "depth": 0, "zero": true, "data": false},
|
|
{ "start": 8192, "length": 1024, "depth": 0, "zero": false, "data": true},
|
|
{ "start": 9216, "length": 8192, "depth": 0, "zero": true, "data": false},
|
|
{ "start": 17408, "length": 1024, "depth": 0, "zero": false, "data": true},
|
|
{ "start": 18432, "length": 67090432, "depth": 0, "zero": true, "data": false}]
|
|
*** done
|