]> git.proxmox.com Git - mirror_qemu.git/commit
tests: virtio-9p: add FLUSH operation test
authorGreg Kurz <groug@kaod.org>
Thu, 1 Feb 2018 20:21:28 +0000 (21:21 +0100)
committerGreg Kurz <groug@kaod.org>
Fri, 2 Feb 2018 10:11:55 +0000 (11:11 +0100)
commit357e2f7f4e4dc68f01d5b81f5cd669874314e14a
tree77a200e760142625271e2b69c79e510eb25f6f9f
parentbe3a6781605803b2c48a48135002869ed2c73cf1
tests: virtio-9p: add FLUSH operation test

The idea is to send a victim request that will possibly block in the
server and to send a flush request to cancel the victim request.

This patch adds two test to verifiy that:
- the server does not reply to a victim request that was actually
  cancelled
- the server replies to the flush request after replying to the
  victim request if it could not cancel it

9p request cancellation reference:

http://man.cat-v.org/plan_9/5/flush

Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
(groug, change the test to only write a single byte to avoid
        any alignment or endianess consideration)
hw/9pfs/9p-synth.c
hw/9pfs/9p-synth.h
hw/9pfs/9p.c
tests/virtio-9p-test.c