[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 09/11] iotests/264: add mirror-cancel test-case

From: Vladimir Sementsov-Ogievskiy
Subject: Re: [PATCH 09/11] iotests/264: add mirror-cancel test-case
Date: Thu, 21 Jan 2021 22:42:15 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1

21.01.2021 04:26, 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     | 38 ++++++++++++++++++++++++++++++--------
  tests/qemu-iotests/264.out |  4 ++--
  2 files changed, 32 insertions(+), 10 deletions(-)

+ 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')

Is this comment still accurate given recent work on the mirror filter?

Hmm, what do you mean? I missed it..

I'm fine taking the patch as-is and tweaking it with followups, though,
in order to make progress.

Good for me, of course

+        result = self.vm.qmp('block-job-cancel', device='drive0')
+        self.assert_qmp(result, 'return', {})
+        start_t = time.time()
+        self.vm.event_wait('BLOCK_JOB_CANCELLED')
+        delta_t = time.time() - start_t
+        self.assertTrue(delta_t < 2.0)

I hope this doesn't fail on CI platforms under heavy load.  It didn't
fail for me locally, but I hope we don't have to revisit it.  Is there
any way we can test this in a manner that is not as fragile?

Hmm, I don't know. We want to check that cancel is not as long as reconnect 
timeout.. If it fails, we'll adjust the constants :) And we have no limit in 
it, we can use 1hour for reconnect-timeout and 10min for mirror to cancel for 
example (but probably something other may fail with such big timeouts)

Reviewed-by: Eric Blake <eblake@redhat.com>

Best regards,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]