aboutsummaryrefslogtreecommitdiff
path: root/hw/9pfs/9p-synth.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/9pfs/9p-synth.c')
-rw-r--r--hw/9pfs/9p-synth.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/hw/9pfs/9p-synth.c b/hw/9pfs/9p-synth.c
index f17b74f444..ade3460706 100644
--- a/hw/9pfs/9p-synth.c
+++ b/hw/9pfs/9p-synth.c
@@ -515,6 +515,12 @@ static int synth_unlinkat(FsContext *ctx, V9fsPath *dir,
return -1;
}
+static ssize_t v9fs_synth_qtest_write(void *buf, int len, off_t offset,
+ void *arg)
+{
+ return 1;
+}
+
static int synth_init(FsContext *ctx, Error **errp)
{
QLIST_INIT(&synth_root.child);
@@ -546,6 +552,11 @@ static int synth_init(FsContext *ctx, Error **errp)
ret = qemu_v9fs_synth_add_file(NULL, 0, QTEST_V9FS_SYNTH_LOPEN_FILE,
NULL, NULL, ctx);
assert(!ret);
+
+ /* File for WRITE test */
+ ret = qemu_v9fs_synth_add_file(NULL, 0, QTEST_V9FS_SYNTH_WRITE_FILE,
+ NULL, v9fs_synth_qtest_write, ctx);
+ assert(!ret);
}
return 0;