On Wed, 12 Oct 2022 12:00:40 +0200 Christian Schoenebeck <qemu_...@crudebyte.com> wrote:
> On Dienstag, 4. Oktober 2022 22:56:44 CEST Christian Schoenebeck wrote: > > This series converts relevant 9p (test) client functions to use named > > function arguments. For instance > > > > do_walk_expect_error(v9p, "non-existent", ENOENT); > > > > becomes > > > > twalk({ > > .client = v9p, .path = "non-existent", .expectErr = ENOENT > > }); > > > > The intention is to make the actual 9p test code more readable, and easier > > to maintain on the long-term. > > > > Not only makes it clear what a literal passed to a function is supposed to > > do, it also makes the order and selection of arguments very liberal, and > > allows to merge multiple, similar functions into one single function. > > > > This is basically just refactoring, it does not change behaviour. > > Too massive for review? > Yeah, sorry :-( But since the approach you're taking here may be valuable elsewhere, and this is qtest, it seems fair to ask Thomas and Laurent to have a look :-) > If so, then I'll probably just go ahead and prepare a PR early next week with > this queued as well. It's just test code refactoring, so I am quite painless > about these changes. > > Best regards, > Christian Schoenebeck > > > > > PREREQUISITES > > ============= > > > > This series requires the following additional patch to work correctly: > > > > https://lore.kernel.org/all/e1odrya-0004fv...@lizzy.crudebyte.com/ > > https://github.com/cschoenebeck/qemu/commit/23d01367fc7a4f27be323ed6d195c527 > > bec9ede1 > > > > Christian Schoenebeck (20): > > tests/9p: merge *walk*() functions > > tests/9p: simplify callers of twalk() > > tests/9p: merge v9fs_tversion() and do_version() > > tests/9p: merge v9fs_tattach(), do_attach(), do_attach_rqid() > > tests/9p: simplify callers of tattach() > > tests/9p: convert v9fs_tgetattr() to declarative arguments > > tests/9p: simplify callers of tgetattr() > > tests/9p: convert v9fs_treaddir() to declarative arguments > > tests/9p: simplify callers of treaddir() > > tests/9p: convert v9fs_tlopen() to declarative arguments > > tests/9p: simplify callers of tlopen() > > tests/9p: convert v9fs_twrite() to declarative arguments > > tests/9p: simplify callers of twrite() > > tests/9p: convert v9fs_tflush() to declarative arguments > > tests/9p: merge v9fs_tmkdir() and do_mkdir() > > tests/9p: merge v9fs_tlcreate() and do_lcreate() > > tests/9p: merge v9fs_tsymlink() and do_symlink() > > tests/9p: merge v9fs_tlink() and do_hardlink() > > tests/9p: merge v9fs_tunlinkat() and do_unlinkat() > > tests/9p: remove unnecessary g_strdup() calls > > > > tests/qtest/libqos/virtio-9p-client.c | 569 +++++++++++++++++++++----- > > tests/qtest/libqos/virtio-9p-client.h | 408 ++++++++++++++++-- > > tests/qtest/virtio-9p-test.c | 529 ++++++++---------------- > > 3 files changed, 1031 insertions(+), 475 deletions(-) > > >