aboutsummaryrefslogtreecommitdiff
path: root/hw/9pfs
diff options
context:
space:
mode:
authorGreg Kurz <groug@kaod.org>2018-02-01 21:21:28 +0100
committerGreg Kurz <groug@kaod.org>2018-02-01 21:21:28 +0100
commit82469aaefea4f8e7a4469c3ec1f680bbf0341c98 (patch)
treebb14193ec9c412fd8c8899c7b6644145e0c54d2c /hw/9pfs
parent2893ddd5988a38196e3ca72853985814de831672 (diff)
tests: virtio-9p: add LOPEN operation test
Trivial test of a successful open. Signed-off-by: Greg Kurz <groug@kaod.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'hw/9pfs')
-rw-r--r--hw/9pfs/9p-synth.c5
-rw-r--r--hw/9pfs/9p-synth.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/hw/9pfs/9p-synth.c b/hw/9pfs/9p-synth.c
index dcbd320da1..f17b74f444 100644
--- a/hw/9pfs/9p-synth.c
+++ b/hw/9pfs/9p-synth.c
@@ -541,6 +541,11 @@ static int synth_init(FsContext *ctx, Error **errp)
assert(!ret);
g_free(name);
}
+
+ /* File for LOPEN test */
+ ret = qemu_v9fs_synth_add_file(NULL, 0, QTEST_V9FS_SYNTH_LOPEN_FILE,
+ NULL, NULL, ctx);
+ assert(!ret);
}
return 0;
diff --git a/hw/9pfs/9p-synth.h b/hw/9pfs/9p-synth.h
index 876b4ef582..2a8d6fd00d 100644
--- a/hw/9pfs/9p-synth.h
+++ b/hw/9pfs/9p-synth.h
@@ -52,5 +52,6 @@ int qemu_v9fs_synth_add_file(V9fsSynthNode *parent, int mode,
/* qtest stuff */
#define QTEST_V9FS_SYNTH_WALK_FILE "WALK%d"
+#define QTEST_V9FS_SYNTH_LOPEN_FILE "LOPEN"
#endif