diff options
author | Christian Schoenebeck <qemu_oss@crudebyte.com> | 2022-10-04 22:54:00 +0200 |
---|---|---|
committer | Christian Schoenebeck <qemu_oss@crudebyte.com> | 2022-10-24 12:24:32 +0200 |
commit | bb286ff8e85dcc222c93c9f3a164034561d1f585 (patch) | |
tree | 7a74f48b2d1b4a738b55dce554eb1db9a0ec24f0 /tests | |
parent | ac9e4e6185f0f5090d18dce2dd3f60d9660be496 (diff) | |
download | qemu-bb286ff8e85dcc222c93c9f3a164034561d1f585.zip qemu-bb286ff8e85dcc222c93c9f3a164034561d1f585.tar.gz qemu-bb286ff8e85dcc222c93c9f3a164034561d1f585.tar.bz2 |
tests/9p: simplify callers of twrite()
Now as twrite() is using a declarative approach, simplify the
code of callers of this function.
Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Message-Id: <7f280ec6a1f9d8afed46567a796562c4dc28afa9.1664917004.git.qemu_oss@crudebyte.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/qtest/virtio-9p-test.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/qtest/virtio-9p-test.c b/tests/qtest/virtio-9p-test.c index a5b9284..5ad7beb 100644 --- a/tests/qtest/virtio-9p-test.c +++ b/tests/qtest/virtio-9p-test.c @@ -377,7 +377,6 @@ static void fs_write(void *obj, void *data, QGuestAllocator *t_alloc) char *wnames[] = { g_strdup(QTEST_V9FS_SYNTH_WRITE_FILE) }; g_autofree char *buf = g_malloc0(write_count); uint32_t count; - P9Req *req; tattach({ .client = v9p }); twalk({ @@ -386,12 +385,10 @@ static void fs_write(void *obj, void *data, QGuestAllocator *t_alloc) tlopen({ .client = v9p, .fid = 1, .flags = O_WRONLY }); - req = twrite({ + count = twrite({ .client = v9p, .fid = 1, .offset = 0, .count = write_count, - .data = buf, .requestOnly = true - }).req; - v9fs_req_wait_for_reply(req, NULL); - v9fs_rwrite(req, &count); + .data = buf + }).count; g_assert_cmpint(count, ==, write_count); g_free(wnames[0]); |