diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2020-02-28 14:02:31 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2020-02-28 14:02:31 +0000 |
commit | e27d5b488ef08408691bfed61f34ee2858136287 (patch) | |
tree | 1266982e9fdd4a0845f0a83abdecc9e4d5f77cac /tests | |
parent | c12d4b60be782d86faefcc22dc62632b8a3e449e (diff) | |
parent | f51d0b4178738bba87d796eba7444f6cdb3aa0fd (diff) | |
download | qemu-e27d5b488ef08408691bfed61f34ee2858136287.zip qemu-e27d5b488ef08408691bfed61f34ee2858136287.tar.gz qemu-e27d5b488ef08408691bfed61f34ee2858136287.tar.bz2 |
Merge remote-tracking branch 'remotes/juanquintela/tags/pull-migration-pull-request' into staging
Migration pull request
# gpg: Signature made Fri 28 Feb 2020 09:21:31 GMT
# gpg: using RSA key 1899FF8EDEBF58CCEE034B82F487EF185872D723
# gpg: Good signature from "Juan Quintela <quintela@redhat.com>" [full]
# gpg: aka "Juan Quintela <quintela@trasno.org>" [full]
# Primary key fingerprint: 1899 FF8E DEBF 58CC EE03 4B82 F487 EF18 5872 D723
* remotes/juanquintela/tags/pull-migration-pull-request:
savevm: Don't call colo_init_ram_cache twice
migration/colo: wrap incoming checkpoint process into new helper
migration: fix COLO broken caused by a previous commit
migration/block: rename BLOCK_SIZE macro
migration/savevm: release gslist after dump_vmstate_json
test-vmstate: Fix memleaks in test_load_qlist
migration/vmstate: Remove redundant statement in vmstate_save_state_v()
multifd: Add zstd compression multifd support
multifd: Add multifd-zstd-level parameter
configure: Enable test and libs for zstd
multifd: Add zlib compression multifd support
multifd: Add multifd-zlib-level parameter
multifd: Make no compression operations into its own structure
migration: Add support for modules
multifd: Add multifd-compression parameter
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/docker/dockerfiles/centos7.docker | 3 | ||||
-rw-r--r-- | tests/docker/dockerfiles/fedora-i386-cross.docker | 3 | ||||
-rw-r--r-- | tests/docker/dockerfiles/fedora.docker | 3 | ||||
-rw-r--r-- | tests/docker/dockerfiles/ubuntu.docker | 1 | ||||
-rw-r--r-- | tests/docker/dockerfiles/ubuntu1804.docker | 1 | ||||
-rw-r--r-- | tests/qtest/migration-test.c | 30 | ||||
-rw-r--r-- | tests/test-vmstate.c | 6 | ||||
-rwxr-xr-x | tests/vm/fedora | 5 | ||||
-rwxr-xr-x | tests/vm/freebsd | 3 | ||||
-rwxr-xr-x | tests/vm/netbsd | 3 | ||||
-rwxr-xr-x | tests/vm/openbsd | 3 |
11 files changed, 49 insertions, 12 deletions
diff --git a/tests/docker/dockerfiles/centos7.docker b/tests/docker/dockerfiles/centos7.docker index 562d65b..cdd72de 100644 --- a/tests/docker/dockerfiles/centos7.docker +++ b/tests/docker/dockerfiles/centos7.docker @@ -33,6 +33,7 @@ ENV PACKAGES \ tar \ vte-devel \ xen-devel \ - zlib-devel + zlib-devel \ + libzstd-devel RUN yum install -y $PACKAGES RUN rpm -q $PACKAGES | sort > /packages.txt diff --git a/tests/docker/dockerfiles/fedora-i386-cross.docker b/tests/docker/dockerfiles/fedora-i386-cross.docker index 9106cf9..cd16cd1 100644 --- a/tests/docker/dockerfiles/fedora-i386-cross.docker +++ b/tests/docker/dockerfiles/fedora-i386-cross.docker @@ -7,7 +7,8 @@ ENV PACKAGES \ gnutls-devel.i686 \ nettle-devel.i686 \ pixman-devel.i686 \ - zlib-devel.i686 + zlib-devel.i686 \ + libzstd-devel.i686 RUN dnf install -y $PACKAGES RUN rpm -q $PACKAGES | sort > /packages.txt diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fedora.docker index 987a3c1..a652222 100644 --- a/tests/docker/dockerfiles/fedora.docker +++ b/tests/docker/dockerfiles/fedora.docker @@ -92,7 +92,8 @@ ENV PACKAGES \ vte291-devel \ which \ xen-devel \ - zlib-devel + zlib-devel \ + libzstd-devel ENV QEMU_CONFIGURE_OPTS --python=/usr/bin/python3 RUN dnf install -y $PACKAGES diff --git a/tests/docker/dockerfiles/ubuntu.docker b/tests/docker/dockerfiles/ubuntu.docker index 4177f33..b6c7b41 100644 --- a/tests/docker/dockerfiles/ubuntu.docker +++ b/tests/docker/dockerfiles/ubuntu.docker @@ -58,6 +58,7 @@ ENV PACKAGES flex bison \ libvdeplug-dev \ libvte-2.91-dev \ libxen-dev \ + libzstd-dev \ make \ python3-yaml \ python3-sphinx \ diff --git a/tests/docker/dockerfiles/ubuntu1804.docker b/tests/docker/dockerfiles/ubuntu1804.docker index 0766f94..1efedee 100644 --- a/tests/docker/dockerfiles/ubuntu1804.docker +++ b/tests/docker/dockerfiles/ubuntu1804.docker @@ -44,6 +44,7 @@ ENV PACKAGES flex bison \ libvdeplug-dev \ libvte-2.91-dev \ libxen-dev \ + libzstd-dev \ make \ python3-yaml \ python3-sphinx \ diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index ccf313f..3d6cc83 100644 --- a/tests/qtest/migration-test.c +++ b/tests/qtest/migration-test.c @@ -378,7 +378,6 @@ static void migrate_check_parameter_str(QTestState *who, const char *parameter, g_free(result); } -__attribute__((unused)) static void migrate_set_parameter_str(QTestState *who, const char *parameter, const char *value) { @@ -1261,7 +1260,7 @@ static void test_migrate_auto_converge(void) test_migrate_end(from, to, true); } -static void test_multifd_tcp(void) +static void test_multifd_tcp(const char *method) { MigrateStart *args = migrate_start_new(); QTestState *from, *to; @@ -1285,6 +1284,9 @@ static void test_multifd_tcp(void) migrate_set_parameter_int(from, "multifd-channels", 16); migrate_set_parameter_int(to, "multifd-channels", 16); + migrate_set_parameter_str(from, "multifd-compression", method); + migrate_set_parameter_str(to, "multifd-compression", method); + migrate_set_capability(from, "multifd", "true"); migrate_set_capability(to, "multifd", "true"); @@ -1316,6 +1318,23 @@ static void test_multifd_tcp(void) g_free(uri); } +static void test_multifd_tcp_none(void) +{ + test_multifd_tcp("none"); +} + +static void test_multifd_tcp_zlib(void) +{ + test_multifd_tcp("zlib"); +} + +#ifdef CONFIG_ZSTD +static void test_multifd_tcp_zstd(void) +{ + test_multifd_tcp("zstd"); +} +#endif + /* * This test does: * source target @@ -1327,7 +1346,6 @@ static void test_multifd_tcp(void) * * And see that it works */ - static void test_multifd_tcp_cancel(void) { MigrateStart *args = migrate_start_new(); @@ -1478,8 +1496,12 @@ int main(int argc, char **argv) test_validate_uuid_dst_not_set); qtest_add_func("/migration/auto_converge", test_migrate_auto_converge); - qtest_add_func("/migration/multifd/tcp", test_multifd_tcp); + qtest_add_func("/migration/multifd/tcp/none", test_multifd_tcp_none); qtest_add_func("/migration/multifd/tcp/cancel", test_multifd_tcp_cancel); + qtest_add_func("/migration/multifd/tcp/zlib", test_multifd_tcp_zlib); +#ifdef CONFIG_ZSTD + qtest_add_func("/migration/multifd/tcp/zstd", test_multifd_tcp_zstd); +#endif ret = g_test_run(); diff --git a/tests/test-vmstate.c b/tests/test-vmstate.c index cea363d..f7b3868 100644 --- a/tests/test-vmstate.c +++ b/tests/test-vmstate.c @@ -1241,7 +1241,6 @@ static void test_gtree_load_iommu(void) TestGTreeIOMMU *orig_iommu = create_iommu(); QEMUFile *fsave, *fload; char eof; - int ret; fsave = open_test_file(true); qemu_put_buffer(fsave, iommu_dump, sizeof(iommu_dump)); @@ -1250,10 +1249,8 @@ static void test_gtree_load_iommu(void) fload = open_test_file(false); vmstate_load_state(fload, &vmstate_iommu, dest_iommu, 1); - ret = qemu_file_get_error(fload); eof = qemu_get_byte(fload); - ret = qemu_file_get_error(fload); - g_assert(!ret); + g_assert(!qemu_file_get_error(fload)); g_assert_cmpint(orig_iommu->id, ==, dest_iommu->id); g_assert_cmpint(eof, ==, QEMU_VM_EOF); @@ -1395,6 +1392,7 @@ static void test_load_qlist(void) compare_containers(orig_container, dest_container); free_container(orig_container); free_container(dest_container); + qemu_fclose(fload); } typedef struct TmpTestStruct { diff --git a/tests/vm/fedora b/tests/vm/fedora index 4d7d604..4843b41 100755 --- a/tests/vm/fedora +++ b/tests/vm/fedora @@ -53,7 +53,10 @@ class FedoraVM(basevm.BaseVM): # libs: audio '"pkgconfig(libpulse)"', '"pkgconfig(alsa)"', - ] + + # libs: migration + '"pkgconfig(libzstd)"', +] BUILD_SCRIPT = """ set -e; diff --git a/tests/vm/freebsd b/tests/vm/freebsd index fb54334..8677087 100755 --- a/tests/vm/freebsd +++ b/tests/vm/freebsd @@ -55,6 +55,9 @@ class FreeBSDVM(basevm.BaseVM): # libs: opengl "libepoxy", "mesa-libs", + + # libs: migration + "zstd", ] BUILD_SCRIPT = """ diff --git a/tests/vm/netbsd b/tests/vm/netbsd index c5069a4..55590f4 100755 --- a/tests/vm/netbsd +++ b/tests/vm/netbsd @@ -49,6 +49,9 @@ class NetBSDVM(basevm.BaseVM): "SDL2", "gtk3+", "libxkbcommon", + + # libs: migration + "zstd", ] BUILD_SCRIPT = """ diff --git a/tests/vm/openbsd b/tests/vm/openbsd index 22cd951..ab6abbe 100755 --- a/tests/vm/openbsd +++ b/tests/vm/openbsd @@ -51,6 +51,9 @@ class OpenBSDVM(basevm.BaseVM): "sdl2", "gtk+3", "libxkbcommon", + + # libs: migration + "zstd", ] BUILD_SCRIPT = """ |