]> git.proxmox.com Git - mirror_qemu.git/commit
qemu-iotests: reduce chance of races in 185
authorStefan Hajnoczi <stefanha@redhat.com>
Tue, 8 May 2018 13:54:35 +0000 (14:54 +0100)
committerJeff Cody <jcody@redhat.com>
Wed, 16 May 2018 17:37:17 +0000 (13:37 -0400)
commitddf2d98a94c8a98a661a217fb629cfd15f4dcec7
tree7778e8d37fdee1e09a7a7517eb19c37090a8d5f0
parentc416eecea5f3aea863ab8fda5a36a24157b8f704
qemu-iotests: reduce chance of races in 185

Commit 8565c3ab537e78f3e69977ec2c609dc9417a806e ("qemu-iotests: fix
185") identified a race condition in a sub-test.

Similar issues also affect the other sub-tests.  If disk I/O completes
quickly, it races with the QMP 'quit' command.  This causes spurious
test failures because QMP events are emitted in an unpredictable order.

This test relies on QEMU internals and there is no QMP API for getting
deterministic behavior needed to make this test 100% reliable.  At the
same time, the test is useful and it would be a shame to remove it.

Add sleep 0.5 to reduce the chance of races.  This is not a real fix but
appears to reduce spurious failures in practice.

Cc: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 20180508135436.30140-2-stefanha@redhat.com
Reviewed-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Jeff Cody <jcody@redhat.com>
tests/qemu-iotests/185