iotests: Derive image names from $TEST_IMG

Avoid creating images with custom filenames in $TEST_DIR, because
non-file protocols may want to keep $TEST_IMG (and all other test
images) in some other directory.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20201027190600.192171-12-mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Max Reitz 2020-10-27 20:05:51 +01:00 committed by Kevin Wolf
parent 63c17df7a4
commit 4c36f03063
4 changed files with 7 additions and 9 deletions

View File

@ -44,8 +44,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_supported_fmt qcow2 qed _supported_fmt qcow2 qed
_supported_proto file _supported_proto file
BACKING_IMG="${TEST_DIR}/backing.img" BACKING_IMG="$TEST_IMG.base"
TEST_IMG="${TEST_DIR}/test.img"
TEST_IMG="$BACKING_IMG" _make_test_img 512M TEST_IMG="$BACKING_IMG" _make_test_img 512M
_make_test_img -F $IMGFMT -b "$BACKING_IMG" 512M _make_test_img -F $IMGFMT -b "$BACKING_IMG" 512M

View File

@ -1,6 +1,6 @@
QA output created by 200 QA output created by 200
Formatting 'TEST_DIR/backing.img', fmt=IMGFMT size=536870912 Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=536870912
Formatting 'TEST_DIR/test.img', fmt=IMGFMT size=536870912 backing_file=TEST_DIR/backing.img backing_fmt=IMGFMT Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=536870912 backing_file=TEST_DIR/t.IMGFMT.base backing_fmt=IMGFMT
wrote 314572800/314572800 bytes at offset 512 wrote 314572800/314572800 bytes at offset 512
300 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 300 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)

View File

@ -51,8 +51,7 @@ _supported_os Linux
_unsupported_imgopts data_file _unsupported_imgopts data_file
DEST_IMG="$TEST_DIR/d.$IMGFMT" DEST_IMG="$TEST_IMG.dest"
TEST_IMG="$TEST_DIR/b.$IMGFMT"
BLKDEBUG_CONF="$TEST_DIR/blkdebug.conf" BLKDEBUG_CONF="$TEST_DIR/blkdebug.conf"
_make_test_img 2M _make_test_img 2M

View File

@ -1,6 +1,6 @@
QA output created by 229 QA output created by 229
Formatting 'TEST_DIR/b.IMGFMT', fmt=IMGFMT size=2097152 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=2097152
Formatting 'TEST_DIR/d.IMGFMT', fmt=IMGFMT size=2097152 Formatting 'TEST_DIR/t.IMGFMT.dest', fmt=IMGFMT size=2097152
wrote 2097152/2097152 bytes at offset 0 wrote 2097152/2097152 bytes at offset 0
2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
{'execute': 'qmp_capabilities'} {'execute': 'qmp_capabilities'}
@ -8,7 +8,7 @@ wrote 2097152/2097152 bytes at offset 0
=== Starting drive-mirror, causing error & stop === === Starting drive-mirror, causing error & stop ===
{'execute': 'drive-mirror', 'arguments': {'device': 'testdisk', 'format': 'IMGFMT', 'target': 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/d.IMGFMT', 'sync': 'full', 'mode': 'existing', 'on-source-error': 'stop', 'on-target-error': 'stop' }} {'execute': 'drive-mirror', 'arguments': {'device': 'testdisk', 'format': 'IMGFMT', 'target': 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.IMGFMT.dest', 'sync': 'full', 'mode': 'existing', 'on-source-error': 'stop', 'on-target-error': 'stop' }}
{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "testdisk"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "testdisk"}}
{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "testdisk"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "testdisk"}}
{"return": {}} {"return": {}}