[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 05/17] iotests/040: Fix TestCommitWithFilters test
From: |
John Snow |
Subject: |
[PATCH v2 05/17] iotests/040: Fix TestCommitWithFilters test |
Date: |
Thu, 24 Mar 2022 14:30:06 -0400 |
Without this change, asserting that qemu_io always returns 0 causes this
test to fail in a way we happened not to be catching previously:
qemu.utils.VerboseProcessError: Command
'('/home/jsnow/src/qemu/bin/git/tests/qemu-iotests/../../qemu-io',
'--cache', 'writeback', '--aio', 'threads', '-f', 'qcow2', '-c',
'read -P 4 3M 1M',
'/home/jsnow/src/qemu/bin/git/tests/qemu-iotests/scratch/3.img')'
returned non-zero exit status 1.
┏━ output ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
┃ qemu-io: can't open device
┃ /home/jsnow/src/qemu/bin/git/tests/qemu-iotests/scratch/3.img:
┃ Could not open backing file: Could not open backing file: Throttle
┃ group 'tg' does not exist
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Explicitly provide the backing file so that opening the file outside of
QEMU (Where we will not have throttle groups) will succeed.
[Patch entirely written by Hanna but I don't have her S-o-B]
[My commit message is probably also garbage, sorry]
[Feel free to suggest a better one]
[I hope your day is going well]
Signed-off-by: John Snow <jsnow@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
---
tests/qemu-iotests/040 | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tests/qemu-iotests/040 b/tests/qemu-iotests/040
index c4a90937dc..30eb97829e 100755
--- a/tests/qemu-iotests/040
+++ b/tests/qemu-iotests/040
@@ -836,7 +836,8 @@ class TestCommitWithFilters(iotests.QMPTestCase):
job_id='commit',
device='top-filter',
top_node='cow-2',
- base_node='cow-1')
+ base_node='cow-1',
+ backing_file=self.img1)
self.assert_qmp(result, 'return', {})
self.wait_until_completed(drive='commit')
@@ -852,7 +853,8 @@ class TestCommitWithFilters(iotests.QMPTestCase):
job_id='commit',
device='top-filter',
top_node='cow-1',
- base_node='cow-0')
+ base_node='cow-0',
+ backing_file=self.img0)
self.assert_qmp(result, 'return', {})
self.wait_until_completed(drive='commit')
--
2.34.1
- [PATCH v2 00/17] iotests: add enhanced debugging info to qemu-io failures, John Snow, 2022/03/24
- [PATCH v2 02/17] iotests/163: Fix broken qemu-io invocation, John Snow, 2022/03/24
- [PATCH v2 01/17] iotests: replace calls to log(qemu_io(...)) with qemu_io_log(), John Snow, 2022/03/24
- [PATCH v2 08/17] iotests/030: fixup, John Snow, 2022/03/24
- [PATCH v2 05/17] iotests/040: Fix TestCommitWithFilters test,
John Snow <=
- [PATCH v2 04/17] iotests/040: Don't check image pattern on zero-length image, John Snow, 2022/03/24
- [PATCH v2 07/17] iotests: rebase qemu_io() on top of qemu_tool(), John Snow, 2022/03/24
- [PATCH v2 09/17] iotests/149: fixup, John Snow, 2022/03/24
- [PATCH v2 12/17] iotests/migration-permissions: fixup, John Snow, 2022/03/24
- [PATCH v2 13/17] iotests/migration-permissions: use assertRaises() for qemu_io() negative test, John Snow, 2022/03/24