On 06.04.22 20:08, Vladimir Sementsov-Ogievskiy wrote:
Add two simple test-cases: timeout failure with
break-snapshot-on-cbw-error behavior and similar with
break-guest-write-on-cbw-error behavior.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@openvz.org>
---
tests/qemu-iotests/tests/copy-before-write | 78 +++++++++++++++++++
.../qemu-iotests/tests/copy-before-write.out | 4 +-
2 files changed, 80 insertions(+), 2 deletions(-)
diff --git a/tests/qemu-iotests/tests/copy-before-write
b/tests/qemu-iotests/tests/copy-before-write
index a32608f597..5c90b8cd50 100755
--- a/tests/qemu-iotests/tests/copy-before-write
+++ b/tests/qemu-iotests/tests/copy-before-write
@@ -122,6 +122,84 @@ read 1048576/1048576 bytes at offset 0
1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
""")
+ def do_cbw_timeout(self, on_cbw_error):
+ result = self.vm.qmp('object-add', {
+ 'qom-type': 'throttle-group',
+ 'id': 'group0',
+ 'limits': {'bps-write': 300 * 1024}
Hm, yes, I can’t find a way to make this work without your other
series. For some reason, not even -accel tcg helps; and using qtest to
advance the virtual clock doesn’t really help because the qemu-io
commands block while the request is throttled.
One thing that should work would be to run everything in a
qemu-storage-daemon instance, and then having qemu-io access an NBD
export...