Skip to content

Commit

Permalink
tests/9p: split virtio-9p-test.c into tests and 9p client part
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
cschoenebeck committed Oct 1, 2022
1 parent a33f8c0 commit 23d0136
Show file tree
Hide file tree
Showing 4 changed files with 849 additions and 744 deletions.
1 change: 1 addition & 0 deletions tests/qtest/libqos/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ libqos_srcs = files(
'tpci200.c',
'virtio.c',
'virtio-9p.c',
'virtio-9p-client.c',
'virtio-balloon.c',
'virtio-blk.c',
'vhost-user-blk.c',
Expand Down
Loading

0 comments on commit 23d0136

Please sign in to comment.