[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-7.2.13 15/17] iotests/244: Don't store data-file with protocol i
From: |
Michael Tokarev |
Subject: |
[Stable-7.2.13 15/17] iotests/244: Don't store data-file with protocol in image |
Date: |
Thu, 4 Jul 2024 15:48:22 +0300 |
From: Kevin Wolf <kwolf@redhat.com>
We want to disable filename parsing for data files because it's too easy
to abuse in malicious image files. Make the test ready for the change by
passing the data file explicitly in command line options.
Cc: qemu-stable@nongnu.org
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Hanna Czenczek <hreitz@redhat.com>
(cherry picked from commit 2eb42a728d27a43fdcad5f37d3f65706ce6deba5)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/tests/qemu-iotests/244 b/tests/qemu-iotests/244
index 3e61fa25bb..bb9cc6512f 100755
--- a/tests/qemu-iotests/244
+++ b/tests/qemu-iotests/244
@@ -215,9 +215,22 @@ $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"
+test_img_with_blkdebug="json:{
+ 'driver': 'qcow2',
+ 'file': {
+ 'driver': 'file',
+ 'filename': '$TEST_IMG'
+ },
+ 'data-file': {
+ 'driver': 'blkdebug',
+ 'image': {
+ 'driver': 'file',
+ 'filename': '$TEST_IMG.data'
+ }
+ }
+}"
+$QEMU_IMG convert -f $IMGFMT -O $IMGFMT -n -C "$TEST_IMG.src"
"$test_img_with_blkdebug"
+$QEMU_IMG compare -f $IMGFMT -F $IMGFMT "$TEST_IMG.src"
"$test_img_with_blkdebug"
echo
echo "=== Flushing should flush the data file ==="
--
2.39.2
- [Stable-7.2.13 03/17] stdvga: fix screen blanking, (continued)
- [Stable-7.2.13 03/17] stdvga: fix screen blanking, Michael Tokarev, 2024/07/04
- [Stable-7.2.13 04/17] linux-user: Make TARGET_NR_setgroups affect only the current thread, Michael Tokarev, 2024/07/04
- [Stable-7.2.13 05/17] tcg/loongarch64: Fix tcg_out_movi vs some pcrel pointers, Michael Tokarev, 2024/07/04
- [Stable-7.2.13 06/17] gitlab-ci.d/buildtest: Merge the --without-default-* jobs, Michael Tokarev, 2024/07/04
- [Stable-7.2.13 07/17] Update lcitool and fedora to 37, Michael Tokarev, 2024/07/04
- [Stable-7.2.13 09/17] tests: Update our CI to use CentOS Stream 9 instead of 8, Michael Tokarev, 2024/07/04
- [Stable-7.2.13 08/17] ci, docker: update CentOS and OpenSUSE Python to non-EOL versions, Michael Tokarev, 2024/07/04
- [Stable-7.2.13 10/17] tests: don't run benchmarks for the tsan build, Michael Tokarev, 2024/07/04
- [Stable-7.2.13 11/17] gitlab-ci: Disable the riscv64-debian-cross-container by default, Michael Tokarev, 2024/07/04
- [Stable-7.2.13 12/17] i386/cpu: fixup number of addressable IDs for processor cores in the physical package, Michael Tokarev, 2024/07/04
- [Stable-7.2.13 15/17] iotests/244: Don't store data-file with protocol in image,
Michael Tokarev <=
- [Stable-7.2.13 13/17] target/arm: Fix VCMLA Dd, Dn, Dm[idx], Michael Tokarev, 2024/07/04
- [Stable-7.2.13 16/17] iotests/270: Don't store data-file with json: prefix in image, Michael Tokarev, 2024/07/04
- [Stable-7.2.13 14/17] qcow2: Don't open data_file with BDRV_O_NO_IO, Michael Tokarev, 2024/07/04
- [Stable-7.2.13 17/17] block: Parse filenames only when explicitly requested, Michael Tokarev, 2024/07/04