]> git.ipfire.org Git - thirdparty/qemu.git/commit
tests: make filemonitor test more robust to event ordering
authorDaniel P. Berrangé <berrange@redhat.com>
Wed, 21 Aug 2019 15:14:27 +0000 (16:14 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 12 Nov 2019 17:59:58 +0000 (11:59 -0600)
commit54c130493c544573253f5bbdcdb705f3d79377f0
treef3f508028ad8f6e3d3fd1762f5738c2684fe51a6
parent3d018ff3bdd8aec260254036b600cfa8d694ced4
tests: make filemonitor test more robust to event ordering

The ordering of events that are emitted during the rmdir
test have changed with kernel >= 5.3. Semantically both
new & old orderings are correct, so we must be able to
cope with either.

To cope with this, when we see an unexpected event, we
push it back onto the queue and look and the subsequent
event to see if that matches instead.

Tested-by: Peter Xu <peterx@redhat.com>
Tested-by: Wei Yang <richardw.yang@linux.intel.com>
Tested-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
(cherry picked from commit bf9e0313c27d8e6ecd7f7de3d63e1cb25d8f6311)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
tests/test-util-filemonitor.c