All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Schoenebeck <qemu_oss@crudebyte.com>
To: qemu-devel@nongnu.org
Cc: Greg Kurz <groug@kaod.org>
Subject: Re: [PATCH] tests/9p: split virtio-9p-test.c into tests and 9p client part
Date: Mon, 26 Sep 2022 14:36:56 +0200	[thread overview]
Message-ID: <1886216.9IVtKRJSP6@silver> (raw)
In-Reply-To: <E1oX4nS-0001UM-Cz@lizzy.crudebyte.com>

On Samstag, 10. September 2022 19:46:55 CEST Christian Schoenebeck wrote:
> 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>
> ---

I plan to queue this patch this week, if not hearing something back.

It's the same code and behaviour anyway, just splitted to a seprate file.

> As I am working on extending the previously sent RFC [1] (which will be
> using function calls with named function arguments), I realized that it
> makes sense to first split the client code out to a new file, and then
> make the upcoming patches based on this patch here. Because that way
> I don't have to touch the order of the client functions and the upcoming
> patches will therefore become better readable.
> 
> [1] https://lore.kernel.org/all/E1oDQqv-0003d4-Hm@lizzy.crudebyte.com/
> 
>  tests/qtest/libqos/meson.build        |   1 +
>  tests/qtest/libqos/virtio-9p-client.c | 683 +++++++++++++++++++++++
>  tests/qtest/libqos/virtio-9p-client.h | 139 +++++
>  tests/qtest/virtio-9p-test.c          | 770 +-------------------------
>  4 files changed, 849 insertions(+), 744 deletions(-)
>  create mode 100644 tests/qtest/libqos/virtio-9p-client.c
>  create mode 100644 tests/qtest/libqos/virtio-9p-client.h




  reply	other threads:[~2022-09-26 12:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-10 17:46 [PATCH] tests/9p: split virtio-9p-test.c into tests and 9p client part Christian Schoenebeck
2022-09-26 12:36 ` Christian Schoenebeck [this message]
2022-09-26 14:30 ` Greg Kurz
2022-09-26 15:19   ` Christian Schoenebeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1886216.9IVtKRJSP6@silver \
    --to=qemu_oss@crudebyte.com \
    --cc=groug@kaod.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.