[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH V2 6/6] tests/qtest: migration: add reboot mode test
|
From: |
Fabiano Rosas |
|
Subject: |
Re: [PATCH V2 6/6] tests/qtest: migration: add reboot mode test |
|
Date: |
Wed, 01 Nov 2023 10:34:28 -0300 |
Steve Sistare <steven.sistare@oracle.com> writes:
> Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
> ---
> tests/qtest/migration-test.c | 27 +++++++++++++++++++++++++++
> 1 file changed, 27 insertions(+)
>
> diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
> index e1c1105..de29fc5 100644
> --- a/tests/qtest/migration-test.c
> +++ b/tests/qtest/migration-test.c
> @@ -2001,6 +2001,31 @@ static void test_precopy_file_offset_bad(void)
> test_file_common(&args, false);
> }
>
> +static void *test_mode_reboot_start(QTestState *from, QTestState *to)
> +{
> + migrate_set_parameter_str(from, "mode", "cpr-reboot");
> + migrate_set_parameter_str(to, "mode", "cpr-reboot");
> +
> + migrate_set_capability(from, "x-ignore-shared", true);
> + migrate_set_capability(to, "x-ignore-shared", true);
> +
> + return NULL;
> +}
> +
> +static void test_mode_reboot(void)
> +{
> + g_autofree char *uri = g_strdup_printf("file:%s/%s", tmpfs,
> + FILE_TEST_FILENAME);
> + MigrateCommon args = {
> + .start.use_shmem = true,
> + .connect_uri = uri,
> + .listen_uri = "defer",
> + .start_hook = test_mode_reboot_start
> + };
> +
> + test_file_common(&args, true);
> +}
> +
> static void test_precopy_tcp_plain(void)
> {
> MigrateCommon args = {
> @@ -3056,6 +3081,8 @@ int main(int argc, char **argv)
> qtest_add_func("/migration/precopy/file/offset/bad",
> test_precopy_file_offset_bad);
>
> + qtest_add_func("/migration/mode/reboot", test_mode_reboot);
> +
> #ifdef CONFIG_GNUTLS
> qtest_add_func("/migration/precopy/unix/tls/psk",
> test_precopy_unix_tls_psk);
We have an issue with this test on CI:
$ df -h /dev/shm
Filesystem Size Used Avail Use% Mounted on
shm 64M 0 64M 0% /dev/shm
These are shared CI runners, so AFAICT there's no way to increase the
shared memory size.
Reducing the memory for this single test also wouldn't work because we
can run migration-test for different archs in parallel + there's the
ivshmem_test which uses 4M.
Maybe just leave it out of CI? Laptops will probably have enough shared
memory to not hit this. If we add a warning comment to the test, might
be enough.
- Re: [PATCH V2 6/6] tests/qtest: migration: add reboot mode test,
Fabiano Rosas <=