tests/9p: merge *walk*() functions
authorChristian Schoenebeck <qemu_oss@crudebyte.com>
Tue, 4 Oct 2022 20:53:23 +0000 (22:53 +0200)
committerChristian Schoenebeck <qemu_oss@crudebyte.com>
Mon, 24 Oct 2022 10:24:32 +0000 (12:24 +0200)
commit569f3b63ad5f65d0f86724766fedfffffe0feda3
tree216e9409b002b15b583e1126f88ab62df58792e2
parentf5265c8f917ea8c71a30e549b7e3017c1038db63
tests/9p: merge *walk*() functions

Introduce declarative function calls.

There are currently 4 different functions for sending a 9p 'Twalk'
request: v9fs_twalk(), do_walk(), do_walk_rqids() and
do_walk_expect_error(). They are all doing the same thing, just in a
slightly different way and with slightly different function arguments.

Merge those 4 functions into a single function by using a struct for
function call arguments and use designated initializers when calling
this function to turn usage into a declarative approach, which is
better readable and easier to maintain.

Also move private functions genfid(), split() and split_free() from
virtio-9p-test.c to virtio-9p-client.c.

Based-on: <E1odrya-0004Fv-97@lizzy.crudebyte.com>
Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Message-Id: <607969dbfbc63c1be008df9131133711b046e979.1664917004.git.qemu_oss@crudebyte.com>
tests/qtest/libqos/virtio-9p-client.c
tests/qtest/libqos/virtio-9p-client.h
tests/qtest/virtio-9p-test.c