[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 3/7] iotests: add copy-before-write: on-cbw-error tests
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
Re: [PATCH v4 3/7] iotests: add copy-before-write: on-cbw-error tests |
Date: |
Tue, 28 Jun 2022 10:34:18 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 |
I had a long and not fun debugging session through gitlab pipelines with this:)
The problem is that pure QEMUMachine doesn't work on arm in gitlab. And we have
to specify at least machine. And we don't want qtest, as described in commit
message.
So, the following fix helps:
On 4/7/22 16:27, Vladimir Sementsov-Ogievskiy wrote:
Add tests for new option of copy-before-write filter: on-cbw-error.
Note that we use QEMUMachine instead of VM class, because in further
commit we'll want to use throttling which doesn't work with -accel
qtest used by VM.
We also touch pylintrc to not break iotest 297.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@openvz.org>
---
tests/qemu-iotests/pylintrc | 5 +
tests/qemu-iotests/tests/copy-before-write | 132 ++++++++++++++++++
.../qemu-iotests/tests/copy-before-write.out | 5 +
3 files changed, 142 insertions(+)
create mode 100755 tests/qemu-iotests/tests/copy-before-write
create mode 100644 tests/qemu-iotests/tests/copy-before-write.out
diff --git a/tests/qemu-iotests/pylintrc b/tests/qemu-iotests/pylintrc
index 32ab77b8bb..f4f823a991 100644
--- a/tests/qemu-iotests/pylintrc
+++ b/tests/qemu-iotests/pylintrc
@@ -51,3 +51,8 @@ notes=FIXME,
# Maximum number of characters on a single line.
max-line-length=79
+
+
+[SIMILARITIES]
+
+min-similarity-lines=6
diff --git a/tests/qemu-iotests/tests/copy-before-write
b/tests/qemu-iotests/tests/copy-before-write
new file mode 100755
index 0000000000..6c7638965e
--- /dev/null
+++ b/tests/qemu-iotests/tests/copy-before-write
@@ -0,0 +1,132 @@
+#!/usr/bin/env python3
+# group: auto backup
[..]
+
+ def setUp(self):
+ qemu_img_create('-f', iotests.imgfmt, source_img, size)
+ qemu_img_create('-f', iotests.imgfmt, temp_img, size)
+ qemu_io('-c', 'write 0 1M', source_img)
+
+ self.vm = QEMUMachine(iotests.qemu_prog)
Will fix to be:
+ opts = ['-nodefaults', '-display', 'none', '-machine', 'none']
+ self.vm = QEMUMachine(iotests.qemu_prog, opts,
+ base_temp_dir=iotests.test_dir,
+ sock_dir=iotests.sock_dir)
+ self.vm.launch()
+
So, if no objections, I'm going to resend a PULL request (v1 was "[PULL 00/10] Block
jobs & NBD patches") with this fix and small improvement in 06.
--
Best regards,
Vladimir
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH v4 3/7] iotests: add copy-before-write: on-cbw-error tests,
Vladimir Sementsov-Ogievskiy <=