This series does several changes to virtio-9p-test in order to be able to test request cancellation (flush in 9p wording):
patches 1-2: preparatory work, basically doing things in the test code, rather that in the common code for flexibility and clarity patch 3: the cornerstone of the series, switch to using the synth fsdev backend, which allows to associate specific write/read ops to a given file. Since this backend never got used since it was merged, it looks like an ideal vehicle to add QTEST aware code in QEMU patches 4-5: trivial open & write tests, since the flush test will need to open a file and write to it patch 6: another important patch that allows to know the length written by the guest into a used buffer patch 7: the goal of this series, two request cancellation tests This series depends on the following patch: https://lists.nongnu.org/archive/html/qemu-devel/2018-01/msg05604.html Please comment. Cheers, -- Greg --- Greg Kurz (7): tests: virtio-9p: move request tag to the test functions tests: virtio-9p: wait for completion in the test code tests: virtio-9p: use the synth backend tests: virtio-9p: add LOPEN operation test tests: virtio-9p: add WRITE operation test libqos/virtio: return length written into used descriptor tests: virtio-9p: add FLUSH operation test hw/9pfs/9p-synth.c | 56 ++++++++++ hw/9pfs/9p-synth.h | 11 ++ hw/9pfs/9p.c | 1 tests/libqos/virtio.c | 25 +++- tests/libqos/virtio.h | 3 - tests/virtio-9p-test.c | 263 ++++++++++++++++++++++++++++++++++++++++------ tests/virtio-blk-test.c | 24 ++-- tests/virtio-net-test.c | 6 + tests/virtio-scsi-test.c | 3 - 9 files changed, 335 insertions(+), 57 deletions(-)