Message ID | 20201118180433.11931-12-vsementsov@virtuozzo.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | mirror: cancel nbd reconnect | expand |
On 11/18/20 12:04 PM, Vladimir Sementsov-Ogievskiy wrote: > Check that cancel doesn't wait for 10s of nbd reconnect timeout. > > Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> > --- > tests/qemu-iotests/264 | 21 ++++++++++++++------- > 1 file changed, 14 insertions(+), 7 deletions(-) > Reviewed-by: Eric Blake <eblake@redhat.com>
On 1/20/21 7:28 PM, Eric Blake wrote: > On 11/18/20 12:04 PM, Vladimir Sementsov-Ogievskiy wrote: >> Check that cancel doesn't wait for 10s of nbd reconnect timeout. >> >> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> >> --- >> tests/qemu-iotests/264 | 21 ++++++++++++++------- >> 1 file changed, 14 insertions(+), 7 deletions(-) >> > > Reviewed-by: Eric Blake <eblake@redhat.com> > With this patch applied as-is, the test fails for me: --- /home/eblake/qemu/tests/qemu-iotests/264.out 2021-01-20 20:18:54.741366521 -0600 +++ /home/eblake/qemu/build/tests/qemu-iotests/264.out.bad 2021-01-20 20:20:37.242451172 -0600 @@ -1,5 +1,5 @@ -.. +... ---------------------------------------------------------------------- -Ran 2 tests +Ran 3 tests but with no obvious visibility into why. Did you forget to check in changes to 264.out?
21.01.2021 05:21, Eric Blake wrote: > On 1/20/21 7:28 PM, Eric Blake wrote: >> On 11/18/20 12:04 PM, Vladimir Sementsov-Ogievskiy wrote: >>> Check that cancel doesn't wait for 10s of nbd reconnect timeout. >>> >>> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> >>> --- >>> tests/qemu-iotests/264 | 21 ++++++++++++++------- >>> 1 file changed, 14 insertions(+), 7 deletions(-) >>> >> >> Reviewed-by: Eric Blake <eblake@redhat.com> >> > > With this patch applied as-is, the test fails for me: > > --- /home/eblake/qemu/tests/qemu-iotests/264.out 2021-01-20 > 20:18:54.741366521 -0600 > +++ /home/eblake/qemu/build/tests/qemu-iotests/264.out.bad 2021-01-20 > 20:20:37.242451172 -0600 > @@ -1,5 +1,5 @@ > -.. > +... > ---------------------------------------------------------------------- > -Ran 2 tests > +Ran 3 tests > > but with no obvious visibility into why. Did you forget to check in > changes to 264.out? > Oops, definitely, I forget to add new test-case to .out file.
diff --git a/tests/qemu-iotests/264 b/tests/qemu-iotests/264 index 3c6f29317f..b830078834 100755 --- a/tests/qemu-iotests/264 +++ b/tests/qemu-iotests/264 @@ -93,13 +93,7 @@ class TestNbdReconnect(iotests.QMPTestCase): result = self.vm.qmp('blockdev-del', node_name='backup0') self.assert_qmp(result, 'return', {}) - def test_mirror_cancel(self): - # Mirror speed limit doesn't work well enough, it seems that mirror - # will run many parallel requests anyway. MAX_IN_FLIGHT is 16 and - # MAX_IO_BYTES is 1M in mirror.c, so let's use 20M disk. - self.init_vm(20 * 1024 * 1024) - self.start_job('blockdev-mirror') - + def cancel_job(self): result = self.vm.qmp('block-job-cancel', device='drive0') self.assert_qmp(result, 'return', {}) @@ -108,6 +102,19 @@ class TestNbdReconnect(iotests.QMPTestCase): delta_t = time.time() - start_t self.assertTrue(delta_t < 2.0) + def test_mirror_cancel(self): + # Mirror speed limit doesn't work well enough, it seems that mirror + # will run many parallel requests anyway. MAX_IN_FLIGHT is 16 and + # MAX_IO_BYTES is 1M in mirror.c, so let's use 20M disk. + self.init_vm(20 * 1024 * 1024) + self.start_job('blockdev-mirror') + self.cancel_job() + + def test_backup_cancel(self): + self.init_vm(5 * 1024 * 1024) + self.start_job('blockdev-backup') + self.cancel_job() + if __name__ == '__main__': iotests.main(supported_fmts=['qcow2'])
Check that cancel doesn't wait for 10s of nbd reconnect timeout. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> --- tests/qemu-iotests/264 | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-)