diff options
author | Greg Kurz <groug@kaod.org> | 2018-02-01 21:21:27 +0100 |
---|---|---|
committer | Greg Kurz <groug@kaod.org> | 2018-02-01 21:21:27 +0100 |
commit | 2893ddd5988a38196e3ca72853985814de831672 (patch) | |
tree | 81572a00973e343c884547aeb432303a8112dd70 /hw/9pfs/9p-synth.h | |
parent | 60b1fa9de1513713807b49be8a9f25077d5ab2ed (diff) |
tests: virtio-9p: use the synth backend
The purpose of virtio-9p-test is to test the virtio-9p device, especially
the 9p server state machine. We don't really care what fsdev backend we're
using. Moreover, if we want to be able to test the flush request or a
device reset with in-flights I/O, it is close to impossible to achieve
with a physical backend because we cannot ask it reliably to put an I/O
on hold at a specific point in time.
Fortunately, we can do that with the synthetic backend, which allows to
register callbacks on read/write accesses to a specific file. This will
be used by a later patch to test the 9P flush request.
The walk request test is converted to using the synth backend.
Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'hw/9pfs/9p-synth.h')
-rw-r--r-- | hw/9pfs/9p-synth.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/9pfs/9p-synth.h b/hw/9pfs/9p-synth.h index 49c2fc7b27..876b4ef582 100644 --- a/hw/9pfs/9p-synth.h +++ b/hw/9pfs/9p-synth.h @@ -49,4 +49,8 @@ int qemu_v9fs_synth_add_file(V9fsSynthNode *parent, int mode, const char *name, v9fs_synth_read read, v9fs_synth_write write, void *arg); +/* qtest stuff */ + +#define QTEST_V9FS_SYNTH_WALK_FILE "WALK%d" + #endif |