OSDN Git Service

tests/9p: split virtio-9p-test.c into tests and 9p client part
authorChristian Schoenebeck <qemu_oss@crudebyte.com>
Thu, 29 Sep 2022 11:41:06 +0000 (13:41 +0200)
committerChristian Schoenebeck <qemu_oss@crudebyte.com>
Mon, 24 Oct 2022 10:24:32 +0000 (12:24 +0200)
commit684f912034395a4958600a3ccca972db5d31be94
tree3122492f4824d6e2faa14484aba56eb3dc7a6dd1
parentf723f626627fda681327075105701695d7c630e5
tests/9p: split virtio-9p-test.c into tests and 9p client part

This patch is pure refactoring, it does not change behaviour.

virtio-9p-test.c grew to 1657 lines. Let's split this file up between
actual 9p test cases vs. 9p test client, to make it easier to
concentrate on the actual 9p tests.

Move the 9p test client code to a new unit virtio-9p-client.c, which
are basically all functions and types prefixed with v9fs_* already.

Note that some client wrapper functions (do_*) are preserved in
virtio-9p-test.c, simply because these wrapper functions are going to
be wiped with subsequent patches anyway.

As the global QGuestAllocator variable is moved to virtio-9p-client.c,
add a new function v9fs_set_allocator() to be used by virtio-9p-test.c
instead of fiddling with a global variable across units and libraries.

Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Message-Id: <E1odrya-0004Fv-97@lizzy.crudebyte.com>
tests/qtest/libqos/meson.build
tests/qtest/libqos/virtio-9p-client.c [new file with mode: 0644]
tests/qtest/libqos/virtio-9p-client.h [new file with mode: 0644]
tests/qtest/virtio-9p-test.c