On Thu, Mar 03, 2022 at 05:48:14PM +0100, Hanna Reitz wrote: > 185 tests quitting qemu while a block job is active. It does not > specifically test quitting qemu while a mirror or active commit job is > in its READY phase. > > Add two test cases for this, where we respectively mirror or commit to > an external QSD instance, which provides a throttled block device. qemu > is supposed to cancel the job so that it can quit as soon as possible > instead of waiting for the job to complete (which it did before 6.2). > > Signed-off-by: Hanna Reitz <hre...@redhat.com> > --- > tests/qemu-iotests/185 | 190 ++++++++++++++++++++++++++++++++++++- > tests/qemu-iotests/185.out | 48 ++++++++++ > 2 files changed, 237 insertions(+), 1 deletion(-) > > diff --git a/tests/qemu-iotests/185 b/tests/qemu-iotests/185 > index f2ec5c5ceb..8b1143dc16 100755 > --- a/tests/qemu-iotests/185 > +++ b/tests/qemu-iotests/185 > @@ -33,6 +33,12 @@ _cleanup() > _rm_test_img "${TEST_IMG}.copy" > _cleanup_test_img > _cleanup_qemu > + > + if [ -f "$TEST_DIR/qsd.pid" ]; then > + kill -SIGKILL "$(cat "$TEST_DIR/qsd.pid")" > + rm -f "$TEST_DIR/qsd.pid" > + fi > + rm -f "$SOCK_DIR/qsd.sock" > } > trap "_cleanup; exit \$status" 0 1 2 3 15 > > @@ -45,7 +51,7 @@ _supported_fmt qcow2 > _supported_proto file > _supported_os Linux > > -size=64M > +size=$((64 * 1048576))
I tend to write $((64 * 1024 * 1024)) rather than remembering all the digits of 2^20, but your way is fine. Nice test addition! Reviewed-by: Eric Blake <ebl...@redhat.com> I'm happy to queue this series through my NBD tree in time for softfreeze, if no one else speaks for it first. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org