[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 46/78] iotests: Test copy offloading with external data file
From: |
Michael Roth |
Subject: |
[PATCH 46/78] iotests: Test copy offloading with external data file |
Date: |
Tue, 16 Jun 2020 09:15:15 -0500 |
From: Kevin Wolf <kwolf@redhat.com>
This adds a test for 'qemu-img convert' with copy offloading where the
target image has an external data file. If the test hosts supports it,
it tests both the case where copy offloading is supported and the case
where it isn't (otherwise we just test unsupported twice).
More specifically, the case with unsupported copy offloading tests
qcow2_alloc_cluster_abort() with external data files.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20200211094900.17315-4-kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit a0cf8daf77548786ced84d773f06fc70571c5d38)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
tests/qemu-iotests/244 | 14 ++++++++++++++
tests/qemu-iotests/244.out | 6 ++++++
2 files changed, 20 insertions(+)
diff --git a/tests/qemu-iotests/244 b/tests/qemu-iotests/244
index 13978f93d2..2f5dfb9edd 100755
--- a/tests/qemu-iotests/244
+++ b/tests/qemu-iotests/244
@@ -194,6 +194,20 @@ $QEMU_IO -c 'read -P 0x11 0 1M' -f $IMGFMT "$TEST_IMG" |
_filter_qemu_io
$QEMU_IMG map --output=human "$TEST_IMG" | _filter_testdir
$QEMU_IMG map --output=json "$TEST_IMG"
+echo
+echo "=== Copy offloading ==="
+echo
+
+# Make use of copy offloading if the test host can provide it
+_make_test_img -o "data_file=$TEST_IMG.data" 64M
+$QEMU_IMG convert -f $IMGFMT -O $IMGFMT -n -C "$TEST_IMG.src" "$TEST_IMG"
+$QEMU_IMG compare -f $IMGFMT -F $IMGFMT "$TEST_IMG.src" "$TEST_IMG"
+
+# blkdebug doesn't support copy offloading, so this tests the error path
+$QEMU_IMG amend -f $IMGFMT -o "data_file=blkdebug::$TEST_IMG.data" "$TEST_IMG"
+$QEMU_IMG convert -f $IMGFMT -O $IMGFMT -n -C "$TEST_IMG.src" "$TEST_IMG"
+$QEMU_IMG compare -f $IMGFMT -F $IMGFMT "$TEST_IMG.src" "$TEST_IMG"
+
# success, all done
echo "*** done"
rm -f $seq.full
diff --git a/tests/qemu-iotests/244.out b/tests/qemu-iotests/244.out
index 6a3d0067cc..e6f4dc7993 100644
--- a/tests/qemu-iotests/244.out
+++ b/tests/qemu-iotests/244.out
@@ -122,4 +122,10 @@ Offset Length Mapped to File
0 0x100000 0 TEST_DIR/t.qcow2.data
[{ "start": 0, "length": 1048576, "depth": 0, "zero": false, "data": true,
"offset": 0},
{ "start": 1048576, "length": 66060288, "depth": 0, "zero": true, "data":
false}]
+
+=== Copy offloading ===
+
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
data_file=TEST_DIR/t.IMGFMT.data
+Images are identical.
+Images are identical.
*** done
--
2.17.1
- [PATCH 28/78] dp8393x: Always use 32-bit accesses, (continued)
- [PATCH 28/78] dp8393x: Always use 32-bit accesses, Michael Roth, 2020/06/16
- [PATCH 33/78] dp8393x: Implement packet size limit and RBAE interrupt, Michael Roth, 2020/06/16
- [PATCH 35/78] dp8393x: Use long-word-aligned RRA pointers in 32-bit mode, Michael Roth, 2020/06/16
- [PATCH 36/78] dp8393x: Pad frames to word or long word boundary, Michael Roth, 2020/06/16
- [PATCH 37/78] dp8393x: Clear descriptor in_use field to release packet, Michael Roth, 2020/06/16
- [PATCH 38/78] dp8393x: Always update RRA pointers and sequence numbers, Michael Roth, 2020/06/16
- [PATCH 39/78] dp8393x: Don't reset Silicon Revision register, Michael Roth, 2020/06/16
- [PATCH 40/78] dp8393x: Don't stop reception upon RBE interrupt assertion, Michael Roth, 2020/06/16
- [PATCH 03/78] i386: Resolve CPU models to v1 by default, Michael Roth, 2020/06/16
- [PATCH 44/78] qcow2: update_refcount(): Reset old_table_index after qcow2_cache_put(), Michael Roth, 2020/06/16
- [PATCH 46/78] iotests: Test copy offloading with external data file,
Michael Roth <=
- [PATCH 42/78] plugins/core: add missing break in cb_to_tcg_flags, Michael Roth, 2020/06/16
- [PATCH 45/78] qcow2: Fix qcow2_alloc_cluster_abort() for external data file, Michael Roth, 2020/06/16
- [PATCH 47/78] qcow2: Fix alloc_cluster_abort() for pre-existing clusters, Michael Roth, 2020/06/16
- [PATCH 41/78] s390/sclp: improve special wait psw logic, Michael Roth, 2020/06/16
- [PATCH 48/78] iotests/026: Test EIO on preallocated zero cluster, Michael Roth, 2020/06/16
- [PATCH 04/78] qapi: better document NVMe blockdev @device parameter, Michael Roth, 2020/06/16
- [PATCH 43/78] tcg: save vaddr temp for plugin usage, Michael Roth, 2020/06/16
- [PATCH 49/78] iotests/026: Test EIO on allocation in a data-file, Michael Roth, 2020/06/16
- [PATCH 51/78] scsi/qemu-pr-helper: Fix out-of-bounds access to trnptid_list[], Michael Roth, 2020/06/16
- [PATCH 50/78] virtio: gracefully handle invalid region caches, Michael Roth, 2020/06/16