From: Peter Xu <peterx@redhat.com>
To: Fabiano Rosas <farosas@suse.de>
Cc: qemu-devel@nongnu.org, "Peter Maydell" <peter.maydell@linaro.org>,
"Daniel P . Berrangé" <berrange@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Laurent Vivier" <lvivier@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: [PATCH v2 07/22] tests/qtest/migration: Rename migration-helpers.c
Date: Thu, 21 Nov 2024 18:04:41 -0500 [thread overview]
Message-ID: <Zz-8iXBl79D0F7qM@x1n> (raw)
In-Reply-To: <20241113194630.3385-8-farosas@suse.de>
On Wed, Nov 13, 2024 at 04:46:15PM -0300, Fabiano Rosas wrote:
> Rename migration-helpers.c to migration-util.c to make its purpose
> more explicit and avoid the "helper" terminology.
>
> Move the file to the qtest/migration/ directory along with the rest of
> the migration files.
>
> Signed-off-by: Fabiano Rosas <farosas@suse.de>
> ---
> tests/qtest/meson.build | 4 ++--
> tests/qtest/migration-test.c | 2 +-
> tests/qtest/migration/migration-qmp.c | 2 +-
> tests/qtest/migration/migration-qmp.h | 2 ++
> .../{migration-helpers.c => migration/migration-util.c} | 4 ++--
> .../{migration-helpers.h => migration/migration-util.h} | 9 ++++++---
> tests/qtest/virtio-net-failover.c | 2 +-
> 7 files changed, 15 insertions(+), 10 deletions(-)
> rename tests/qtest/{migration-helpers.c => migration/migration-util.c} (99%)
> rename tests/qtest/{migration-helpers.h => migration/migration-util.h} (89%)
>
> diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
> index ca199b9491..b9f70ac32f 100644
> --- a/tests/qtest/meson.build
> +++ b/tests/qtest/meson.build
> @@ -331,9 +331,9 @@ endif
> tpmemu_files = ['tpm-emu.c', 'tpm-util.c', 'tpm-tests.c']
>
> migration_files = [files(
> - 'migration-helpers.c',
> 'migration/bootfile.c',
> 'migration/migration-qmp.c',
> + 'migration/migration-util.c',
> )]
>
> if gnutls.found()
> @@ -347,7 +347,7 @@ endif
> qtests = {
> 'bios-tables-test': [io, 'boot-sector.c', 'acpi-utils.c', 'tpm-emu.c'],
> 'cdrom-test': files('boot-sector.c'),
> - 'dbus-vmstate-test': files('migration-helpers.c') + dbus_vmstate1,
> + 'dbus-vmstate-test': files('migration/migration-qmp.c', 'migration/migration-util.c') + dbus_vmstate1,
Seems like the -qmp.c part should belong to previous patch.
> 'erst-test': files('erst-test.c'),
> 'ivshmem-test': [rt, '../../contrib/ivshmem-server/ivshmem-server.c'],
> 'migration-test': migration_files,
> diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
> index a0c63026ed..59f02f7815 100644
> --- a/tests/qtest/migration-test.c
> +++ b/tests/qtest/migration-test.c
> @@ -22,9 +22,9 @@
> #include "crypto/tlscredspsk.h"
> #include "ppc-util.h"
>
> -#include "migration-helpers.h"
> #include "migration/bootfile.h"
> #include "migration/migration-qmp.h"
> +#include "migration/migration-util.h"
> #ifdef CONFIG_GNUTLS
> # include "tests/unit/crypto-tls-psk-helpers.h"
> # ifdef CONFIG_TASN1
> diff --git a/tests/qtest/migration/migration-qmp.c b/tests/qtest/migration/migration-qmp.c
> index 20be46fdf6..71b14b51b2 100644
> --- a/tests/qtest/migration/migration-qmp.c
> +++ b/tests/qtest/migration/migration-qmp.c
> @@ -12,8 +12,8 @@
>
> #include "qemu/osdep.h"
> #include "libqtest.h"
> -#include "migration-helpers.h"
> #include "migration-qmp.h"
> +#include "migration-util.h"
> #include "qapi/error.h"
> #include "qapi/qmp/qdict.h"
> #include "qapi/qmp/qjson.h"
> diff --git a/tests/qtest/migration/migration-qmp.h b/tests/qtest/migration/migration-qmp.h
> index ed927cf408..caaa78722a 100644
> --- a/tests/qtest/migration/migration-qmp.h
> +++ b/tests/qtest/migration/migration-qmp.h
> @@ -2,6 +2,8 @@
> #ifndef MIGRATION_QMP_H
> #define MIGRATION_QMP_H
>
> +#include "migration-util.h"
> +
> G_GNUC_PRINTF(4, 5)
> void migrate_qmp_fail(QTestState *who, const char *uri,
> const char *channels, const char *fmt, ...);
> diff --git a/tests/qtest/migration-helpers.c b/tests/qtest/migration/migration-util.c
> similarity index 99%
> rename from tests/qtest/migration-helpers.c
> rename to tests/qtest/migration/migration-util.c
> index 218ee4e59f..8a974ded22 100644
> --- a/tests/qtest/migration-helpers.c
> +++ b/tests/qtest/migration/migration-util.c
> @@ -1,5 +1,5 @@
> /*
> - * QTest migration helpers
> + * QTest migration utilities
> *
> * Copyright (c) 2016-2018 Red Hat, Inc. and/or its affiliates
> * based on the vhost-user-test.c that is:
> @@ -19,8 +19,8 @@
> #include "qemu/cutils.h"
> #include "qemu/memalign.h"
>
> -#include "migration-helpers.h"
> #include "migration/bootfile.h"
> +#include "migration/migration-util.h"
>
> static char *SocketAddress_to_str(SocketAddress *addr)
> {
> diff --git a/tests/qtest/migration-helpers.h b/tests/qtest/migration/migration-util.h
> similarity index 89%
> rename from tests/qtest/migration-helpers.h
> rename to tests/qtest/migration/migration-util.h
> index 2cb1f78d9e..de1bc0ad0c 100644
> --- a/tests/qtest/migration-helpers.h
> +++ b/tests/qtest/migration/migration-util.h
> @@ -10,11 +10,14 @@
> *
> */
>
> -#ifndef MIGRATION_HELPERS_H
> -#define MIGRATION_HELPERS_H
> +#ifndef MIGRATION_UTIL_H
> +#define MIGRATION_UTIL_H
>
> #include "libqtest.h"
>
> +#define QEMU_ENV_SRC "QTEST_QEMU_BINARY_SRC"
> +#define QEMU_ENV_DST "QTEST_QEMU_BINARY_DST"
Are these re-defined in migration-test.c?
> +
> typedef struct QTestMigrationState {
> bool stop_seen;
> bool resume_seen;
> @@ -51,4 +54,4 @@ void migration_test_add(const char *path, void (*fn)(void));
> char *migrate_get_connect_uri(QTestState *who);
> void migrate_set_ports(QTestState *to, QList *channel_list);
>
> -#endif /* MIGRATION_HELPERS_H */
> +#endif /* MIGRATION_UTIL_H */
> diff --git a/tests/qtest/virtio-net-failover.c b/tests/qtest/virtio-net-failover.c
> index 28a6147d9a..08365ffa11 100644
> --- a/tests/qtest/virtio-net-failover.c
> +++ b/tests/qtest/virtio-net-failover.c
> @@ -11,8 +11,8 @@
> #include "libqtest.h"
> #include "libqos/pci.h"
> #include "libqos/pci-pc.h"
> -#include "migration-helpers.h"
> #include "migration/migration-qmp.h"
> +#include "migration/migration-util.h"
> #include "qapi/qmp/qdict.h"
> #include "qapi/qmp/qlist.h"
> #include "qapi/qmp/qjson.h"
> --
> 2.35.3
>
--
Peter Xu
next prev parent reply other threads:[~2024-11-21 23:05 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-13 19:46 [PATCH v2 00/22] tests/qtest: migration-test refactoring Fabiano Rosas
2024-11-13 19:46 ` [PATCH v2 01/22] tests/qtest/migration: Fix indentations Fabiano Rosas
2024-11-13 19:46 ` [PATCH v2 02/22] tests/qtest/migration: Standardize hook names Fabiano Rosas
2024-11-25 20:51 ` Peter Xu
2024-11-25 21:03 ` Fabiano Rosas
2024-11-13 19:46 ` [PATCH v2 03/22] tests/qtest/migration: Stop calling everything "test" Fabiano Rosas
2024-11-25 20:47 ` Peter Xu
2024-11-13 19:46 ` [PATCH v2 04/22] tests/migration: Disambiguate guestperf vs. a-b Fabiano Rosas
2024-11-21 21:05 ` Peter Xu
2024-11-13 19:46 ` [PATCH v2 05/22] tests/qtest/migration: Move bootfile code to its own file Fabiano Rosas
2024-11-13 19:46 ` [PATCH v2 06/22] tests/qtest/migration: Move qmp helpers to a separate file Fabiano Rosas
2024-11-21 23:00 ` Peter Xu
2024-11-13 19:46 ` [PATCH v2 07/22] tests/qtest/migration: Rename migration-helpers.c Fabiano Rosas
2024-11-21 23:04 ` Peter Xu [this message]
2024-11-13 19:46 ` [PATCH v2 08/22] tests/qtest/migration: Move ufd_version_check to utils Fabiano Rosas
2024-11-25 17:17 ` Peter Xu
2024-11-13 19:46 ` [PATCH v2 09/22] tests/qtest/migration: Move kvm_dirty_ring_supported " Fabiano Rosas
2024-11-25 17:18 ` Peter Xu
2024-11-13 19:46 ` [PATCH v2 10/22] tests/qtest/migration: Isolate test initialization Fabiano Rosas
2024-11-25 17:29 ` Peter Xu
2024-11-13 19:46 ` [PATCH v2 11/22] tests/qtest/migration: Move common test code Fabiano Rosas
2024-11-25 17:31 ` Peter Xu
2024-11-13 19:46 ` [PATCH v2 12/22] tests/qtest/migration: Split TLS tests from migration-test.c Fabiano Rosas
2024-11-25 17:48 ` Peter Xu
2024-11-13 19:46 ` [PATCH v2 13/22] tests/qtest/migration: Split compression " Fabiano Rosas
2024-11-25 17:50 ` Peter Xu
2024-11-13 19:46 ` [PATCH v2 14/22] tests/qtest/migration: Split postcopy tests Fabiano Rosas
2024-11-25 17:51 ` Peter Xu
2024-11-13 19:46 ` [PATCH v2 15/22] tests/qtest/migration: Split file tests Fabiano Rosas
2024-11-25 17:52 ` Peter Xu
2024-11-13 19:46 ` [PATCH v2 16/22] tests/qtest/migration: Split precopy tests Fabiano Rosas
2024-11-25 17:53 ` Peter Xu
2024-11-13 19:46 ` [PATCH v2 17/22] tests/qtest/migration: Split CPR tests Fabiano Rosas
2024-11-25 17:54 ` Peter Xu
2024-11-13 19:46 ` [PATCH v2 18/22] tests/qtest/migration: Split validation tests + misc Fabiano Rosas
2024-11-25 17:55 ` Peter Xu
2024-11-13 19:46 ` [PATCH v2 19/22] tests/qtest/migration: Add migration-test-smoke Fabiano Rosas
2024-12-18 17:46 ` Peter Xu
2024-12-18 18:13 ` Fabiano Rosas
2024-12-18 20:22 ` Peter Xu
2024-12-18 21:08 ` Fabiano Rosas
2024-12-18 22:04 ` Peter Xu
2024-12-19 15:38 ` Fabiano Rosas
2024-12-19 17:42 ` Peter Xu
2024-12-19 19:31 ` Fabiano Rosas
2024-12-20 15:18 ` Peter Xu
2024-12-20 15:34 ` Daniel P. Berrangé
2024-12-20 16:06 ` Peter Xu
2024-12-20 16:39 ` Fabiano Rosas
2024-11-13 19:46 ` [PATCH v2 20/22] tests/qtest/migration: Pick smoke tests Fabiano Rosas
2024-11-13 19:46 ` [PATCH v2 21/22] tests/qtest: Add support for check-qtest-<subsystem> Fabiano Rosas
2024-11-13 19:46 ` [PATCH v2 22/22] docs: Add migration tests documentation Fabiano Rosas
2024-11-25 20:58 ` [PATCH v2 00/22] tests/qtest: migration-test refactoring Peter Xu
2024-11-25 21:18 ` Fabiano Rosas
2024-11-25 21:23 ` Peter Xu
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=Zz-8iXBl79D0F7qM@x1n \
--to=peterx@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=berrange@redhat.com \
--cc=farosas@suse.de \
--cc=lvivier@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).