Add make check tests for Migration
v2 cover Add make check tests for Migration
Hi
This is on top of my set_cache_size series.
big changes is this v2:
- to make review easier, I started renaming postcopy-test.c to migration-test.c
- Did cleanups/refactoring there
- Don't use global-qtest anymore
- check that the parameters that we sent got really set
- RFH: comrpress threads tests is not working for some weird reason. Using the same code on command line works. still investigating why.
ToDoo:
- tcp: after discussions with dave, we ended in conclusion that we need to use the 0 port and let the system gives us a free one
But .... that means that we need to be able to get that port back somehow. "info migrate" woring on destination side?
- compression threads. There is some weird interaction with the test hardness and every migration thread get waiting in a different semaphore. Investigating if it is a race/bug/whateverr
- deprecated commands: There was a suggestion to make migrate_set_parameter look at the parameter name and test old/new depending on something. Not sure what to do here.
- testing commands: Is there a way to launch qemu and just sent qmp/hmp commands without having to really run anything else?
Please review,.
Later, Juan.
[v1]
- add test for precopy for unix/tcp
exec and fd to came, don't know how to test rdma without hardware
- add tests using deprecated interfaces
- add test for xbzrle
Note to myself, there is no way to set the cache size with migraton_set_parameters
- Add test for compress threads
disabled on the series, right now it appears that compression is not working at all
- Move postcopy to use new results
Idea is to move it on top of migration-test.c, but first I want some reviews on basic idea
Please, review.
Juan.
*** BLURB HERE ***
Juan Quintela (10):
tests: rename postcopy-test to migration-test
tests: Refactor setting of parameters/capabilities
tests: Factorize out migrate_test_start/end
tests: Don't abuse global_qtest
tests: check that migration parameters are really assigned
tests: Add migration precopy test
tests: Add basic migration precopy tcp test
tests: Add precopy test using deprecated commands
tests: Add migration xbzrle test
[RFH] tests: Add migration compress threads tests
MAINTAINERS | 1 +
tests/Makefile.include | 6 +-
tests/{postcopy-test.c => migration-test.c} | 492 ++++++++++++++++++++++------
3 files changed, 394 insertions(+), 105 deletions(-)
rename tests/{postcopy-test.c => migration-test.c} (59%)Signature · 1 line
2.13.6
PATCH v2 1/10 tests: rename postcopy-test to migration-test
Instead of repeating the code, we are going to bo more tests on this file
---
MAINTAINERS | 1 +
tests/Makefile.include | 6 +++---
tests/{postcopy-test.c => migration-test.c} | 8 +++-----
3 files changed, 7 insertions(+), 8 deletions(-)
rename tests/{postcopy-test.c => migration-test.c} (98%)MAINTAINERS +1 -0
@@ -1562,6 +1562,7 @@ F: include/migration/ F: migration/ F: scripts/vmstate-static-checker.py F: tests/vmstate-static-checker-data/ +F: tests/migration-test.c F: docs/devel/migration.txt F: qapi/migration.json
tests/Makefile.include +3 -3
@@ -287,7 +287,7 @@ endif check-qtest-i386-$(CONFIG_SLIRP) += tests/test-netfilter$(EXESUF) check-qtest-i386-$(CONFIG_POSIX) += tests/test-filter-mirror$(EXESUF) check-qtest-i386-$(CONFIG_POSIX) += tests/test-filter-redirector$(EXESUF) -check-qtest-i386-y += tests/postcopy-test$(EXESUF) +check-qtest-i386-y += tests/migration-test$(EXESUF) check-qtest-i386-y += tests/test-x86-cpuid-compat$(EXESUF) check-qtest-i386-y += tests/numa-test$(EXESUF) check-qtest-x86_64-y += $(check-qtest-i386-y)
@@ -315,7 +315,7 @@ check-qtest-ppc64-y += tests/boot-order-test$(EXESUF) check-qtest-ppc64-y += tests/prom-env-test$(EXESUF) check-qtest-ppc64-y += tests/pnv-xscom-test$(EXESUF) check-qtest-ppc64-y += tests/drive_del-test$(EXESUF) -check-qtest-ppc64-y += tests/postcopy-test$(EXESUF) +check-qtest-ppc64-y += tests/migration-test$(EXESUF) check-qtest-ppc64-y += tests/boot-serial-test$(EXESUF) check-qtest-ppc64-y += tests/rtas-test$(EXESUF) check-qtest-ppc64-$(CONFIG_SLIRP) += tests/pxe-test$(EXESUF)
@@ -784,7 +784,7 @@ tests/usb-hcd-uhci-test$(EXESUF): tests/usb-hcd-uhci-test.o $(libqos-usb-obj-y) tests/usb-hcd-ehci-test$(EXESUF): tests/usb-hcd-ehci-test.o $(libqos-usb-obj-y) tests/usb-hcd-xhci-test$(EXESUF): tests/usb-hcd-xhci-test.o $(libqos-usb-obj-y) tests/pc-cpu-test$(EXESUF): tests/pc-cpu-test.o -tests/postcopy-test$(EXESUF): tests/postcopy-test.o +tests/migration-test$(EXESUF): tests/migration-test.o tests/vhost-user-test$(EXESUF): tests/vhost-user-test.o $(test-util-obj-y) \ $(qtest-obj-y) $(test-io-obj-y) $(libqos-virtio-obj-y) $(libqos-pc-obj-y) \ $(chardev-obj-y)
tests/migration-test.c renamed from tests/postcopy-test.c +3 -5
@@ -1,5 +1,5 @@/* -* QTest testcase for postcopy +* QTest testcase for migration * * Copyright (c) 2016 Red Hat, Inc. and/or its affiliates * based on the vhost-user-test.c that is:
@@ -243,8 +243,6 @@ static QDict *return_or_event(QDict *response)/* * It's tricky to use qemu's migration event capability with qtest, * events suddenly appearing confuse the qmp()/hmp() responses. -* so wait for a couple of passes to have happened before -* going postcopy. */ static uint64_t get_migration_pass (void )
@@ -504,7 +502,7 @@ static void test_migrate(void)int main (int argc,char **argv) { -char template[] ="/tmp/postcopy-test-XXXXXX" ; +char template[] ="/tmp/migration-test-XXXXXX" ;int ret;g_test_init (&argc, &argv,NULL );
@@ -521,7 +519,7 @@ int main(int argc, char **argv)module_call_init (MODULE_INIT_QOM ); -qtest_add_func ("/postcopy" , test_migrate); +qtest_add_func ("/migration/postcopy/unix" , test_migrate); ret =g_test_run ();
Signature · 1 line
2.13.6
Re: [Qemu-devel] [PATCH v2 01/10] tests: rename postcopy-test to migration-test
Quoted 3 lines · * Juan Quintela ([email protected]) wrote:
Instead of repeating the code, we are going to bo more tests on this file
Signed-off-by Juan Quintela <[email protected]>
Quoted 94 lines
--- MAINTAINERS | 1 + tests/Makefile.include | 6 +++--- tests/{postcopy-test.c => migration-test.c} | 8 +++----- 3 files changed, 7 insertions(+), 8 deletions(-) rename tests/{postcopy-test.c => migration-test.c} (98%)MAINTAINERS +1
-0@@ -1562,6 +1562,7 @@ F: include/migration/ F: migration/ F: scripts/vmstate-static-checker.py F: tests/vmstate-static-checker-data/ +F: tests/migration-test.c F: docs/devel/migration.txt F: qapi/migration.jsontests/Makefile.include +3
-3@@ -287,7 +287,7 @@ endif check-qtest-i386-$(CONFIG_SLIRP) += tests/test-netfilter$(EXESUF) check-qtest-i386-$(CONFIG_POSIX) += tests/test-filter-mirror$(EXESUF) check-qtest-i386-$(CONFIG_POSIX) += tests/test-filter-redirector$(EXESUF) -check-qtest-i386-y += tests/postcopy-test$(EXESUF) +check-qtest-i386-y += tests/migration-test$(EXESUF) check-qtest-i386-y += tests/test-x86-cpuid-compat$(EXESUF) check-qtest-i386-y += tests/numa-test$(EXESUF) check-qtest-x86_64-y += $(check-qtest-i386-y)@@ -315,7 +315,7 @@ check-qtest-ppc64-y += tests/boot-order-test$(EXESUF) check-qtest-ppc64-y += tests/prom-env-test$(EXESUF) check-qtest-ppc64-y += tests/pnv-xscom-test$(EXESUF) check-qtest-ppc64-y += tests/drive_del-test$(EXESUF) -check-qtest-ppc64-y += tests/postcopy-test$(EXESUF) +check-qtest-ppc64-y += tests/migration-test$(EXESUF) check-qtest-ppc64-y += tests/boot-serial-test$(EXESUF) check-qtest-ppc64-y += tests/rtas-test$(EXESUF) check-qtest-ppc64-$(CONFIG_SLIRP) += tests/pxe-test$(EXESUF)@@ -784,7 +784,7 @@ tests/usb-hcd-uhci-test$(EXESUF): tests/usb-hcd-uhci-test.o $(libqos-usb-obj-y) tests/usb-hcd-ehci-test$(EXESUF): tests/usb-hcd-ehci-test.o $(libqos-usb-obj-y) tests/usb-hcd-xhci-test$(EXESUF): tests/usb-hcd-xhci-test.o $(libqos-usb-obj-y) tests/pc-cpu-test$(EXESUF): tests/pc-cpu-test.o -tests/postcopy-test$(EXESUF): tests/postcopy-test.o +tests/migration-test$(EXESUF): tests/migration-test.o tests/vhost-user-test$(EXESUF): tests/vhost-user-test.o $(test-util-obj-y) \ $(qtest-obj-y) $(test-io-obj-y) $(libqos-virtio-obj-y) $(libqos-pc-obj-y) \ $(chardev-obj-y)tests/migration-test.c renamed from tests/postcopy-test.c +3
-5@@ -1,5 +1,5 @@/* -* QTest testcase for postcopy +* QTest testcase for migration * * Copyright (c) 2016 Red Hat, Inc. and/or its affiliates * based on the vhost-user-test.c that is: @@ -243,8 +243,6 @@ static QDict *return_or_event(QDict *response)/* * It's tricky to use qemu's migration event capability with qtest, * events suddenly appearing confuse the qmp()/hmp() responses. -* so wait for a couple of passes to have happened before -* going postcopy. */ static uint64_t get_migration_pass (void )@@ -504,7 +502,7 @@ static void test_migrate(void)int main (int argc,char **argv) { -char template[] ="/tmp/postcopy-test-XXXXXX" ; +char template[] ="/tmp/migration-test-XXXXXX" ;int ret;g_test_init (&argc, &argv,NULL );@@ -521,7 +519,7 @@ int main(int argc, char **argv)module_call_init (MODULE_INIT_QOM ); -qtest_add_func ("/postcopy" , test_migrate); +qtest_add_func ("/migration/postcopy/unix" , test_migrate); ret =g_test_run ();Signature · 1 line
2.13.6
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK
PATCH v2 2/10 tests: Refactor setting of parameters/capabilities
In reply to Juan QuintelaSo we can use them in future tests
--- tests/migration-test.c | 101 +++++++++++++++++++++++++++++++------------------ 1 file changed, 64 insertions(+), 37 deletions(-)
tests/migration-test.c +64 -37
@@ -351,12 +351,69 @@ static void cleanup(const char *filename)g_free (path); } +static void migrate_set_downtime (QTestState *who,const char *value) +{ +QDict *rsp; +gchar *cmd; + + cmd =g_strdup_printf ("{ 'execute': 'migrate_set_downtime'," +"'arguments': { 'value': %s } }" , value); + rsp =qtest_qmp (who, cmd); +g_free (cmd); +g_assert (qdict_haskey (rsp,"return" )); +QDECREF (rsp); +} + +static void migrate_set_speed (QTestState *who,const char *value) +{ +QDict *rsp; +gchar *cmd; + + cmd =g_strdup_printf ("{ 'execute': 'migrate_set_speed'," +"'arguments': { 'value': %s } }" , value); + rsp =qtest_qmp (who, cmd); +g_free (cmd); +g_assert (qdict_haskey (rsp,"return" )); +QDECREF (rsp); +} + +static void migrate_set_capability (QTestState *who,const char *capability, +const char *value) +{ +QDict *rsp; +gchar *cmd; + + cmd =g_strdup_printf ("{ 'execute': 'migrate-set-capabilities'," +"'arguments': { " +"'capabilities': [ { " +"'capability': '%s', 'state': %s } ] } }" , + capability, value); + rsp =qtest_qmp (who, cmd); +g_free (cmd); +g_assert (qdict_haskey (rsp,"return" )); +QDECREF (rsp); +} + +static void migrate (QTestState *who,const char *uri) +{ +QDict *rsp; +gchar *cmd; + + cmd =g_strdup_printf ("{ 'execute': 'migrate'," +"'arguments': { 'uri': '%s' } }" , + uri); + rsp =qtest_qmp (who, cmd); +g_free (cmd); +g_assert (qdict_haskey (rsp,"return" )); +QDECREF (rsp); +} +static void test_migrate (void ) {char *uri =g_strdup_printf ("unix:%s/migsocket" , tmpfs);QTestState *global = global_qtest, *from, *to;unsigned char dest_byte_a, dest_byte_b, dest_byte_c, dest_byte_d; -gchar *cmd, *cmd_src, *cmd_dst; +gchar *cmd_src, *cmd_dst;QDict *rsp;char *bootpath =g_strdup_printf ("%s/bootsect" , tmpfs);
@@ -405,52 +462,22 @@ static void test_migrate(void) to =qtest_init (cmd_dst);g_free (cmd_dst); - global_qtest = from; - rsp =qmp ("{ 'execute': 'migrate-set-capabilities'," -"'arguments': { " -"'capabilities': [ {" -"'capability': 'postcopy-ram'," -"'state': true } ] } }" ); -g_assert (qdict_haskey (rsp,"return" )); -QDECREF (rsp); - - global_qtest = to; - rsp =qmp ("{ 'execute': 'migrate-set-capabilities'," -"'arguments': { " -"'capabilities': [ {" -"'capability': 'postcopy-ram'," -"'state': true } ] } }" ); -g_assert (qdict_haskey (rsp,"return" )); -QDECREF (rsp); +migrate_set_capability (from,"postcopy-ram" ,"true" ); +migrate_set_capability (to,"postcopy-ram" ,"true" );/* We want to pick a speed slow enough that the test completes * quickly, but that it doesn't complete precopy even on a slow * machine, so also set the downtime. */ - global_qtest = from; - rsp =qmp ("{ 'execute': 'migrate_set_speed'," -"'arguments': { 'value': 100000000 } }" ); -g_assert (qdict_haskey (rsp,"return" )); -QDECREF (rsp); - -/* 1ms downtime - it should never finish precopy */ - rsp =qmp ("{ 'execute': 'migrate_set_downtime'," -"'arguments': { 'value': 0.001 } }" ); -g_assert (qdict_haskey (rsp,"return" )); -QDECREF (rsp); - +migrate_set_speed (from,"100000000" ); +migrate_set_downtime (from,"0.001" );/* Wait for the first serial output from the source */ wait_for_serial ("src_serial" ); - cmd =g_strdup_printf ("{ 'execute': 'migrate'," -"'arguments': { 'uri': '%s' } }" , - uri); - rsp =qmp (cmd); -g_free (cmd); -g_assert (qdict_haskey (rsp,"return" )); -QDECREF (rsp); +migrate (from, uri); + global_qtest = from;wait_for_migration_pass (); rsp =return_or_event (qmp ("{ 'execute': 'migrate-start-postcopy' }" ));
Signature · 1 line
2.13.6
Re: [Qemu-devel] [PATCH v2 02/10] tests: Refactor setting of parameters/capabilities
Quoted 34 lines · * Juan Quintela ([email protected]) wrote:
So we can use them in future tests
Signed-off-by Juan Quintela <[email protected]>--- tests/migration-test.c | 101 +++++++++++++++++++++++++++++++------------------ 1 file changed, 64 insertions(+), 37 deletions(-)tests/migration-test.c +19
-0@@ -351,12 +351,69 @@ static void cleanup(const char *filename)g_free (path); } +static void migrate_set_downtime (QTestState *who,const char *value) +{ +QDict *rsp; +gchar *cmd; + + cmd =g_strdup_printf ("{ 'execute': 'migrate_set_downtime'," +"'arguments': { 'value': %s } }" , value); + rsp =qtest_qmp (who, cmd); +g_free (cmd); +g_assert (qdict_haskey (rsp,"return" )); +QDECREF (rsp); +} + +static void migrate_set_speed (QTestState *who,const char *value) +{ +QDict *rsp; +gchar *cmd; + + cmd = g_strdup_printf("{ 'execute': 'migrate_set_speed',"
tests/migration-test.c static void cleanup(const char *filename) · line 382
Quoted 10 lines
tests/migration-test.c +10
-0+ "'arguments': { 'value': %s } }", value); + rsp =qtest_qmp (who, cmd); +g_free (cmd); +g_assert (qdict_haskey (rsp,"return" )); +QDECREF (rsp); +} + +static void migrate_set_capability (QTestState *who,const char *capability, +const char *value) +{
I'd be tempted to make value a bool here; but it's still better than where we were so,
Quoted 100 lines
tests/migration-test.c +35
-37+QDict *rsp; +gchar *cmd; + + cmd =g_strdup_printf ("{ 'execute': 'migrate-set-capabilities'," +"'arguments': { " +"'capabilities': [ { " +"'capability': '%s', 'state': %s } ] } }" , + capability, value); + rsp =qtest_qmp (who, cmd); +g_free (cmd); +g_assert (qdict_haskey (rsp,"return" )); +QDECREF (rsp); +} + +static void migrate (QTestState *who,const char *uri) +{ +QDict *rsp; +gchar *cmd; + + cmd =g_strdup_printf ("{ 'execute': 'migrate'," +"'arguments': { 'uri': '%s' } }" , + uri); + rsp =qtest_qmp (who, cmd); +g_free (cmd); +g_assert (qdict_haskey (rsp,"return" )); +QDECREF (rsp); +} +static void test_migrate (void ) {char *uri =g_strdup_printf ("unix:%s/migsocket" , tmpfs);QTestState *global = global_qtest, *from, *to;unsigned char dest_byte_a, dest_byte_b, dest_byte_c, dest_byte_d; -gchar *cmd, *cmd_src, *cmd_dst; +gchar *cmd_src, *cmd_dst;QDict *rsp;char *bootpath =g_strdup_printf ("%s/bootsect" , tmpfs);@@ -405,52 +462,22 @@ static void test_migrate(void) to =qtest_init (cmd_dst);g_free (cmd_dst); - global_qtest = from; - rsp =qmp ("{ 'execute': 'migrate-set-capabilities'," -"'arguments': { " -"'capabilities': [ {" -"'capability': 'postcopy-ram'," -"'state': true } ] } }" ); -g_assert (qdict_haskey (rsp,"return" )); -QDECREF (rsp); - - global_qtest = to; - rsp =qmp ("{ 'execute': 'migrate-set-capabilities'," -"'arguments': { " -"'capabilities': [ {" -"'capability': 'postcopy-ram'," -"'state': true } ] } }" ); -g_assert (qdict_haskey (rsp,"return" )); -QDECREF (rsp); +migrate_set_capability (from,"postcopy-ram" ,"true" ); +migrate_set_capability (to,"postcopy-ram" ,"true" );/* We want to pick a speed slow enough that the test completes * quickly, but that it doesn't complete precopy even on a slow * machine, so also set the downtime. */ - global_qtest = from; - rsp =qmp ("{ 'execute': 'migrate_set_speed'," -"'arguments': { 'value': 100000000 } }" ); -g_assert (qdict_haskey (rsp,"return" )); -QDECREF (rsp); - -/* 1ms downtime - it should never finish precopy */ - rsp =qmp ("{ 'execute': 'migrate_set_downtime'," -"'arguments': { 'value': 0.001 } }" ); -g_assert (qdict_haskey (rsp,"return" )); -QDECREF (rsp); - +migrate_set_speed (from,"100000000" ); +migrate_set_downtime (from,"0.001" );/* Wait for the first serial output from the source */ wait_for_serial ("src_serial" ); - cmd =g_strdup_printf ("{ 'execute': 'migrate'," -"'arguments': { 'uri': '%s' } }" , - uri); - rsp =qmp (cmd); -g_free (cmd); -g_assert (qdict_haskey (rsp,"return" )); -QDECREF (rsp); +migrate (from, uri); + global_qtest = from;wait_for_migration_pass (); rsp =return_or_event (qmp ("{ 'execute': 'migrate-start-postcopy' }" ));Signature · 1 line
2.13.6
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK
PATCH v2 3/10 tests: Factorize out migrate_test_start/end
In reply to Juan QuintelaWe fix global_test users left and right
--- tests/migration-test.c | 86 ++++++++++++++++++++++++++++---------------------- 1 file changed, 48 insertions(+), 38 deletions(-)
tests/migration-test.c +48 -38
@@ -301,7 +301,7 @@ static void wait_for_migration_pass(void) }while (pass == initial_pass && !got_stop); } -static void check_guests_ram (void ) +static void check_guests_ram (QTestState *who) {/* Our ASM test will have been incrementing one byte from each page from * 1MB to <100MB in order.
@@ -316,13 +316,13 @@ static void check_guests_ram(void)bool hit_edge = false;bool bad = false; -qtest_memread (global_qtest, start_address, &first_byte,1 ); +qtest_memread (who, start_address, &first_byte,1 ); last_byte = first_byte;for (address = start_address +4096 ; address < end_address; address +=4096 ) {uint8_t b; -qtest_memread (global_qtest, address, &b,1 ); +qtest_memread (who, address, &b,1 );if (b != last_byte) {if (((b +1 ) %256 ) == last_byte && !hit_edge) {/* This is OK, the guest stopped at the point of
@@ -408,14 +408,10 @@ static void migrate(QTestState *who, const char *uri)QDECREF (rsp); } -static void test_migrate (void ) +static void test_migrate_start (QTestState **from,QTestState **to, +const char *uri) { -char *uri =g_strdup_printf ("unix:%s/migsocket" , tmpfs); -QTestState *global = global_qtest, *from, *to; -unsigned char dest_byte_a, dest_byte_b, dest_byte_c, dest_byte_d;gchar *cmd_src, *cmd_dst; -QDict *rsp; -char *bootpath =g_strdup_printf ("%s/bootsect" , tmpfs);const char *arch =qtest_get_arch ();
@@ -456,11 +452,51 @@ static void test_migrate(void)g_free (bootpath); - from =qtest_start (cmd_src); + *from =qtest_start (cmd_src);g_free (cmd_src); - to =qtest_init (cmd_dst); + *to =qtest_init (cmd_dst);g_free (cmd_dst); +} + +static void test_migrate_end (QTestState *from,QTestState *to) +{ +unsigned char dest_byte_a, dest_byte_b, dest_byte_c, dest_byte_d; + +qtest_quit (from); + +qtest_memread (to, start_address, &dest_byte_a,1 ); + +/* Destination still running, wait for a byte to change */ +do { +qtest_memread (to, start_address, &dest_byte_b,1 ); +usleep (10 *1000 ); + }while (dest_byte_a == dest_byte_b); + +qtest_qmp_discard_response (to,"{ 'execute' : 'stop'}" ); +/* With it stopped, check nothing changes */ +qtest_memread (to, start_address, &dest_byte_c,1 ); +sleep (1 ); +qtest_memread (to, start_address, &dest_byte_d,1 ); + g_assert_cmpint(dest_byte_c, ==, dest_byte_d); + +check_guests_ram (to); + +qtest_quit (to); + +cleanup ("bootsect" ); +cleanup ("migsocket" ); +cleanup ("src_serial" ); +cleanup ("dest_serial" ); +} + +static void test_migrate (void ) +{ +char *uri =g_strdup_printf ("unix:%s/migsocket" , tmpfs); +QTestState *global = global_qtest, *from, *to; +QDict *rsp; + +test_migrate_start (&from, &to, uri);migrate_set_capability (from,"postcopy-ram" ,"true" );migrate_set_capability (to,"postcopy-ram" ,"true" );
@@ -495,36 +531,10 @@ static void test_migrate(void) global_qtest = from;wait_for_migration_complete (); -qtest_quit (from); - - global_qtest = to; - -qtest_memread (to, start_address, &dest_byte_a,1 ); - -/* Destination still running, wait for a byte to change */ -do { -qtest_memread (to, start_address, &dest_byte_b,1 ); -usleep (10 *1000 ); - }while (dest_byte_a == dest_byte_b); - -qmp_discard_response ("{ 'execute' : 'stop'}" ); -/* With it stopped, check nothing changes */ -qtest_memread (to, start_address, &dest_byte_c,1 ); -sleep (1 ); -qtest_memread (to, start_address, &dest_byte_d,1 ); - g_assert_cmpint(dest_byte_c, ==, dest_byte_d); - -check_guests_ram (); - -qtest_quit (to);g_free (uri); - global_qtest = global; -cleanup ("bootsect" ); -cleanup ("migsocket" ); -cleanup ("src_serial" ); -cleanup ("dest_serial" ); +test_migrate_end (from, to); }int main (int argc,char **argv)
Signature · 1 line
2.13.6
Re: [Qemu-devel] [PATCH v2 03/10] tests: Factorize out migrate_test_start/end
Quoted 3 lines · * Juan Quintela ([email protected]) wrote:
We fix
global_testusers left and rightSigned-off-by Juan Quintela <[email protected]>
Quoted 145 lines
--- tests/migration-test.c | 86 ++++++++++++++++++++++++++++---------------------- 1 file changed, 48 insertions(+), 38 deletions(-)tests/migration-test.c +48
-38@@ -301,7 +301,7 @@ static void wait_for_migration_pass(void) }while (pass == initial_pass && !got_stop); } -static void check_guests_ram (void ) +static void check_guests_ram (QTestState *who) {/* Our ASM test will have been incrementing one byte from each page from * 1MB to <100MB in order. @@ -316,13 +316,13 @@ static void check_guests_ram(void)bool hit_edge = false;bool bad = false; -qtest_memread (global_qtest, start_address, &first_byte,1 ); +qtest_memread (who, start_address, &first_byte,1 ); last_byte = first_byte;for (address = start_address +4096 ; address < end_address; address +=4096 ) {uint8_t b; -qtest_memread (global_qtest, address, &b,1 ); +qtest_memread (who, address, &b,1 );if (b != last_byte) {if (((b +1 ) %256 ) == last_byte && !hit_edge) {/* This is OK, the guest stopped at the point of @@ -408,14 +408,10 @@ static void migrate(QTestState *who, const char *uri)QDECREF (rsp); } -static void test_migrate (void ) +static void test_migrate_start (QTestState **from,QTestState **to, +const char *uri) { -char *uri =g_strdup_printf ("unix:%s/migsocket" , tmpfs); -QTestState *global = global_qtest, *from, *to; -unsigned char dest_byte_a, dest_byte_b, dest_byte_c, dest_byte_d;gchar *cmd_src, *cmd_dst; -QDict *rsp; -char *bootpath =g_strdup_printf ("%s/bootsect" , tmpfs);const char *arch =qtest_get_arch ();@@ -456,11 +452,51 @@ static void test_migrate(void)g_free (bootpath); - from =qtest_start (cmd_src); + *from =qtest_start (cmd_src);g_free (cmd_src); - to =qtest_init (cmd_dst); + *to =qtest_init (cmd_dst);g_free (cmd_dst); +} + +static void test_migrate_end (QTestState *from,QTestState *to) +{ +unsigned char dest_byte_a, dest_byte_b, dest_byte_c, dest_byte_d; + +qtest_quit (from); + +qtest_memread (to, start_address, &dest_byte_a,1 ); + +/* Destination still running, wait for a byte to change */ +do { +qtest_memread (to, start_address, &dest_byte_b,1 ); +usleep (10 *1000 ); + }while (dest_byte_a == dest_byte_b); + +qtest_qmp_discard_response (to,"{ 'execute' : 'stop'}" ); +/* With it stopped, check nothing changes */ +qtest_memread (to, start_address, &dest_byte_c,1 ); +sleep (1 ); +qtest_memread (to, start_address, &dest_byte_d,1 ); + g_assert_cmpint(dest_byte_c, ==, dest_byte_d); + +check_guests_ram (to); + +qtest_quit (to); + +cleanup ("bootsect" ); +cleanup ("migsocket" ); +cleanup ("src_serial" ); +cleanup ("dest_serial" ); +} + +static void test_migrate (void ) +{ +char *uri =g_strdup_printf ("unix:%s/migsocket" , tmpfs); +QTestState *global = global_qtest, *from, *to; +QDict *rsp; + +test_migrate_start (&from, &to, uri);migrate_set_capability (from,"postcopy-ram" ,"true" );migrate_set_capability (to,"postcopy-ram" ,"true" );@@ -495,36 +531,10 @@ static void test_migrate(void) global_qtest = from;wait_for_migration_complete (); -qtest_quit (from); - - global_qtest = to; - -qtest_memread (to, start_address, &dest_byte_a,1 ); - -/* Destination still running, wait for a byte to change */ -do { -qtest_memread (to, start_address, &dest_byte_b,1 ); -usleep (10 *1000 ); - }while (dest_byte_a == dest_byte_b); - -qmp_discard_response ("{ 'execute' : 'stop'}" ); -/* With it stopped, check nothing changes */ -qtest_memread (to, start_address, &dest_byte_c,1 ); -sleep (1 ); -qtest_memread (to, start_address, &dest_byte_d,1 ); - g_assert_cmpint(dest_byte_c, ==, dest_byte_d); - -check_guests_ram (); - -qtest_quit (to);g_free (uri); - global_qtest = global; -cleanup ("bootsect" ); -cleanup ("migsocket" ); -cleanup ("src_serial" ); -cleanup ("dest_serial" ); +test_migrate_end (from, to); }int main (int argc,char **argv)Signature · 1 line
2.13.6
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK
PATCH v2 4/10 tests: Don't abuse global_qtest
In reply to Juan QuintelaAs we have two guests running, just pass always who we want to send a message to. Once there, refactor return_or_event() into wait_command.
--- tests/migration-test.c | 55 +++++++++++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 28 deletions(-)
tests/migration-test.c +27 -28
@@ -223,20 +223,23 @@ static void wait_for_serial(const char *side)/* * Events can get in the way of responses we are actually waiting for. */ -static QDict *return_or_event (QDict *response) +static QDict *wait_command (QTestState *who,const char *command) {const char *event_string; -if (!qdict_haskey (response,"event" )) { -return response; - } +QDict *response; + + response =qtest_qmp (who, command); -/* OK, it was an event */ - event_string =qdict_get_str (response,"event" ); -if (!strcmp (event_string,"STOP" )) { - got_stop = true; +while (qdict_haskey (response,"event" )) { +/* OK, it was an event */ + event_string =qdict_get_str (response,"event" ); +if (!strcmp (event_string,"STOP" )) { + got_stop = true; + } +QDECREF (response); + response =qtest_qmp_receive (who); } -QDECREF (response); -return return_or_event (qtest_qmp_receive (global_qtest)); +return response; }
@@ -245,12 +248,12 @@ static QDict *return_or_event(QDict *response)* events suddenly appearing confuse the qmp()/hmp() responses. */ -static uint64_t get_migration_pass (void ) +static uint64_t get_migration_pass (QTestState *who) {QDict *rsp, *rsp_return, *rsp_ram;uint64_t result; - rsp =return_or_event (qmp ("{ 'execute': 'query-migrate' }" )); + rsp =wait_command (who,"{ 'execute': 'query-migrate' }" ); rsp_return =qdict_get_qdict (rsp,"return" );if (!qdict_haskey (rsp_return,"ram" )) {/* Still in setup */
@@ -263,7 +266,7 @@ static uint64_t get_migration_pass(void)return result; } -static void wait_for_migration_complete (void ) +static void wait_for_migration_complete (QTestState *who) {QDict *rsp, *rsp_return;bool completed;
@@ -271,7 +274,7 @@ static void wait_for_migration_complete(void) do { const char *status; - rsp = return_or_event(qmp("{ 'execute': 'query-migrate' }")); + rsp = wait_command(who, "{ 'execute': 'query-migrate' }"); rsp_return = qdict_get_qdict(rsp, "return"); status = qdict_get_str(rsp_return, "status"); completed = strcmp(status, "completed") == 0;
@@ -281,14 +284,14 @@ static void wait_for_migration_complete(void) }while (!completed); } -static void wait_for_migration_pass (void ) +static void wait_for_migration_pass (QTestState *who) { -uint64_t initial_pass =get_migration_pass (); +uint64_t initial_pass =get_migration_pass (who);uint64_t pass;/* Wait for the 1st sync */ do { - initial_pass = get_migration_pass(); + initial_pass = get_migration_pass(who); if (got_stop || initial_pass) { break; }
@@ -297,7 +300,7 @@ static void wait_for_migration_pass(void)do {usleep (1000 *100 ); - pass =get_migration_pass (); + pass =get_migration_pass (who); }while (pass == initial_pass && !got_stop); }
@@ -493,7 +496,7 @@ static void test_migrate_end(QTestState *from, QTestState *to)static void test_migrate (void ) {char *uri =g_strdup_printf ("unix:%s/migsocket" , tmpfs); -QTestState *global = global_qtest, *from, *to; +QTestState *from, *to;QDict *rsp;test_migrate_start (&from, &to, uri);
@@ -513,26 +516,22 @@ static void test_migrate(void)migrate (from, uri); - global_qtest = from; -wait_for_migration_pass (); +wait_for_migration_pass (from); - rsp =return_or_event (qmp ("{ 'execute': 'migrate-start-postcopy' }" )); + rsp =wait_command (from,"{ 'execute': 'migrate-start-postcopy' }" );g_assert (qdict_haskey (rsp,"return" ));QDECREF (rsp);if (!got_stop) { -qmp_eventwait ("STOP" ); +qtest_qmp_eventwait (from,"STOP" ); } - global_qtest = to; -qmp_eventwait ("RESUME" ); +qtest_qmp_eventwait (to,"RESUME" );wait_for_serial ("dest_serial" ); - global_qtest = from; -wait_for_migration_complete (); +wait_for_migration_complete (from);g_free (uri); - global_qtest = global;test_migrate_end (from, to); }
Signature · 1 line
2.13.6
Re: [Qemu-devel] [PATCH v2 04/10] tests: Don't abuse global_qtest
Quoted 4 lines · * Juan Quintela ([email protected]) wrote:
As we have two guests running, just pass always who we want to send a message to. Once there, refactor
return_or_event()intowait_command.Signed-off-by Juan Quintela <[email protected]>
Hmm was there anything else anywhere that relied on global_qtest? Hopefully not.
Quoted 146 lines
--- tests/migration-test.c | 55 +++++++++++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 28 deletions(-)tests/migration-test.c +27
-28@@ -223,20 +223,23 @@ static void wait_for_serial(const char *side)/* * Events can get in the way of responses we are actually waiting for. */ -static QDict *return_or_event (QDict *response) +static QDict *wait_command (QTestState *who,const char *command) {const char *event_string; -if (!qdict_haskey (response,"event" )) { -return response; - } +QDict *response; + + response =qtest_qmp (who, command); -/* OK, it was an event */ - event_string =qdict_get_str (response,"event" ); -if (!strcmp (event_string,"STOP" )) { - got_stop = true; +while (qdict_haskey (response,"event" )) { +/* OK, it was an event */ + event_string =qdict_get_str (response,"event" ); +if (!strcmp (event_string,"STOP" )) { + got_stop = true; + } +QDECREF (response); + response =qtest_qmp_receive (who); } -QDECREF (response); -return return_or_event (qtest_qmp_receive (global_qtest)); +return response; }@@ -245,12 +248,12 @@ static QDict *return_or_event(QDict *response)* events suddenly appearing confuse the qmp()/hmp() responses. */ -static uint64_t get_migration_pass (void ) +static uint64_t get_migration_pass (QTestState *who) {QDict *rsp, *rsp_return, *rsp_ram;uint64_t result; - rsp =return_or_event (qmp ("{ 'execute': 'query-migrate' }" )); + rsp =wait_command (who,"{ 'execute': 'query-migrate' }" ); rsp_return =qdict_get_qdict (rsp,"return" );if (!qdict_haskey (rsp_return,"ram" )) {/* Still in setup */ @@ -263,7 +266,7 @@ static uint64_t get_migration_pass(void)return result; } -static void wait_for_migration_complete (void ) +static void wait_for_migration_complete (QTestState *who) {QDict *rsp, *rsp_return;bool completed;@@ -271,7 +274,7 @@ static void wait_for_migration_complete(void) do { const char *status; - rsp = return_or_event(qmp("{ 'execute': 'query-migrate' }")); + rsp = wait_command(who, "{ 'execute': 'query-migrate' }"); rsp_return = qdict_get_qdict(rsp, "return"); status = qdict_get_str(rsp_return, "status"); completed = strcmp(status, "completed") == 0;@@ -281,14 +284,14 @@ static void wait_for_migration_complete(void) }while (!completed); } -static void wait_for_migration_pass (void ) +static void wait_for_migration_pass (QTestState *who) { -uint64_t initial_pass =get_migration_pass (); +uint64_t initial_pass =get_migration_pass (who);uint64_t pass;/* Wait for the 1st sync */ do { - initial_pass = get_migration_pass(); + initial_pass = get_migration_pass(who); if (got_stop || initial_pass) { break; }@@ -297,7 +300,7 @@ static void wait_for_migration_pass(void)do {usleep (1000 *100 ); - pass =get_migration_pass (); + pass =get_migration_pass (who); }while (pass == initial_pass && !got_stop); }@@ -493,7 +496,7 @@ static void test_migrate_end(QTestState *from, QTestState *to)static void test_migrate (void ) {char *uri =g_strdup_printf ("unix:%s/migsocket" , tmpfs); -QTestState *global = global_qtest, *from, *to; +QTestState *from, *to;QDict *rsp;test_migrate_start (&from, &to, uri);@@ -513,26 +516,22 @@ static void test_migrate(void)migrate (from, uri); - global_qtest = from; -wait_for_migration_pass (); +wait_for_migration_pass (from); - rsp =return_or_event (qmp ("{ 'execute': 'migrate-start-postcopy' }" )); + rsp =wait_command (from,"{ 'execute': 'migrate-start-postcopy' }" );g_assert (qdict_haskey (rsp,"return" ));QDECREF (rsp);if (!got_stop) { -qmp_eventwait ("STOP" ); +qtest_qmp_eventwait (from,"STOP" ); } - global_qtest = to; -qmp_eventwait ("RESUME" ); +qtest_qmp_eventwait (to,"RESUME" );wait_for_serial ("dest_serial" ); - global_qtest = from; -wait_for_migration_complete (); +wait_for_migration_complete (from);g_free (uri); - global_qtest = global;test_migrate_end (from, to); }Signature · 1 line
2.13.6
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK
Re: [Qemu-devel] [PATCH v2 04/10] tests: Don't abuse global_qtest
Quoted 8 lines · Dr. David Alan Gilbert
Quoted 4 lines · * Juan Quintela ([email protected]) wrote:
As we have two guests running, just pass always who we want to send a message to. Once there, refactor
return_or_event()intowait_command.Signed-off-by Juan Quintela <[email protected]>Hmm was there anything else anywhere that relied on
global_qtest? Hopefully not.
I tested making global_qtest = NULL for the whole test (and put it back at the end), so ...
Quoted 152 lines
Reviewed-by Dr. David Alan Gilbert <[email protected]>Quoted 146 lines
--- tests/migration-test.c | 55 +++++++++++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 28 deletions(-)tests/migration-test.c +27
-28@@ -223,20 +223,23 @@ static void wait_for_serial(const char *side)/* * Events can get in the way of responses we are actually waiting for. */ -static QDict *return_or_event (QDict *response) +static QDict *wait_command (QTestState *who,const char *command) {const char *event_string; -if (!qdict_haskey (response,"event" )) { -return response; - } +QDict *response; + + response =qtest_qmp (who, command); -/* OK, it was an event */ - event_string =qdict_get_str (response,"event" ); -if (!strcmp (event_string,"STOP" )) { - got_stop = true; +while (qdict_haskey (response,"event" )) { +/* OK, it was an event */ + event_string =qdict_get_str (response,"event" ); +if (!strcmp (event_string,"STOP" )) { + got_stop = true; + } +QDECREF (response); + response =qtest_qmp_receive (who); } -QDECREF (response); -return return_or_event (qtest_qmp_receive (global_qtest)); +return response; }@@ -245,12 +248,12 @@ static QDict *return_or_event(QDict *response)* events suddenly appearing confuse the qmp()/hmp() responses. */ -static uint64_t get_migration_pass (void ) +static uint64_t get_migration_pass (QTestState *who) {QDict *rsp, *rsp_return, *rsp_ram;uint64_t result; - rsp =return_or_event (qmp ("{ 'execute': 'query-migrate' }" )); + rsp =wait_command (who,"{ 'execute': 'query-migrate' }" ); rsp_return =qdict_get_qdict (rsp,"return" );if (!qdict_haskey (rsp_return,"ram" )) {/* Still in setup */ @@ -263,7 +266,7 @@ static uint64_t get_migration_pass(void)return result; } -static void wait_for_migration_complete (void ) +static void wait_for_migration_complete (QTestState *who) {QDict *rsp, *rsp_return;bool completed;@@ -271,7 +274,7 @@ static void wait_for_migration_complete(void) do { const char *status; - rsp = return_or_event(qmp("{ 'execute': 'query-migrate' }")); + rsp = wait_command(who, "{ 'execute': 'query-migrate' }"); rsp_return = qdict_get_qdict(rsp, "return"); status = qdict_get_str(rsp_return, "status"); completed = strcmp(status, "completed") == 0;@@ -281,14 +284,14 @@ static void wait_for_migration_complete(void) }while (!completed); } -static void wait_for_migration_pass (void ) +static void wait_for_migration_pass (QTestState *who) { -uint64_t initial_pass =get_migration_pass (); +uint64_t initial_pass =get_migration_pass (who);uint64_t pass;/* Wait for the 1st sync */ do { - initial_pass = get_migration_pass(); + initial_pass = get_migration_pass(who); if (got_stop || initial_pass) { break; }@@ -297,7 +300,7 @@ static void wait_for_migration_pass(void)do {usleep (1000 *100 ); - pass =get_migration_pass (); + pass =get_migration_pass (who); }while (pass == initial_pass && !got_stop); }@@ -493,7 +496,7 @@ static void test_migrate_end(QTestState *from, QTestState *to)static void test_migrate (void ) {char *uri =g_strdup_printf ("unix:%s/migsocket" , tmpfs); -QTestState *global = global_qtest, *from, *to; +QTestState *from, *to;QDict *rsp;test_migrate_start (&from, &to, uri);@@ -513,26 +516,22 @@ static void test_migrate(void)migrate (from, uri); - global_qtest = from; -wait_for_migration_pass (); +wait_for_migration_pass (from); - rsp =return_or_event (qmp ("{ 'execute': 'migrate-start-postcopy' }" )); + rsp =wait_command (from,"{ 'execute': 'migrate-start-postcopy' }" );g_assert (qdict_haskey (rsp,"return" ));QDECREF (rsp);if (!got_stop) { -qmp_eventwait ("STOP" ); +qtest_qmp_eventwait (from,"STOP" ); } - global_qtest = to; -qmp_eventwait ("RESUME" ); +qtest_qmp_eventwait (to,"RESUME" );wait_for_serial ("dest_serial" ); - global_qtest = from; -wait_for_migration_complete (); +wait_for_migration_complete (from);g_free (uri); - global_qtest = global;test_migrate_end (from, to); }Signature · 1 line
2.13.6--
Dr. David Alan Gilbert / [email protected] / Manchester, UK
PATCH v2 5/10 tests: check that migration parameters are really assigned
In reply to Juan Quintela--- tests/migration-test.c | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-)
tests/migration-test.c +24 -3
@@ -354,17 +354,37 @@ static void cleanup(const char *filename)g_free (path); } -static void migrate_set_downtime (QTestState *who,const char *value) +static void migrate_check_parameter (QTestState *who,const char *parameter, +const char *value) +{ +QDict *rsp, *rsp_return; +const char *result; + + rsp =wait_command (who,"{ 'execute': 'query-migrate-parameters' }" ); + rsp_return =qdict_get_qdict (rsp,"return" ); + result =g_strdup_printf ("%" PRId64, +qdict_get_try_int (rsp_return, parameter,-1 )); + g_assert_cmpstr(result, ==, value); +QDECREF (rsp); +} + +static void migrate_set_downtime (QTestState *who,const double value) {QDict *rsp;gchar *cmd; +char *expected; +int64_t result_int; cmd =g_strdup_printf ("{ 'execute': 'migrate_set_downtime'," -"'arguments': { 'value': %s } }" , value); +"'arguments': { 'value': %g } }" , value); rsp =qtest_qmp (who, cmd);g_free (cmd);g_assert (qdict_haskey (rsp,"return" ));QDECREF (rsp); + result_int = value *1000L ; + expected =g_strdup_printf ("%" PRId64, result_int); +migrate_check_parameter (who,"downtime-limit" , expected); +g_free (expected); }static void migrate_set_speed (QTestState *who,const char *value)
@@ -378,6 +398,7 @@ static void migrate_set_speed(QTestState *who, const char *value)g_free (cmd);g_assert (qdict_haskey (rsp,"return" ));QDECREF (rsp); +migrate_check_parameter (who,"max-bandwidth" , value); } static void migrate_set_capability(QTestState *who, const char *capability,
@@ -509,7 +530,7 @@ static void test_migrate(void)* machine, so also set the downtime. */ migrate_set_speed (from,"100000000" ); -migrate_set_downtime (from,"0.001" ); +migrate_set_downtime (from,0.001 );/* Wait for the first serial output from the source */ wait_for_serial ("src_serial" );
Signature · 1 line
2.13.6
Re: [Qemu-devel] [PATCH v2 05/10] tests: check that migration parameters are really assigned
Quoted 28 lines · * Juan Quintela ([email protected]) wrote:
Signed-off-by Juan Quintela <[email protected]>--- tests/migration-test.c | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-)tests/migration-test.c +14
-1@@ -354,17 +354,37 @@ static void cleanup(const char *filename)g_free (path); } -static void migrate_set_downtime (QTestState *who,const char *value) +static void migrate_check_parameter (QTestState *who,const char *parameter, +const char *value) +{ +QDict *rsp, *rsp_return; +const char *result; + + rsp =wait_command (who,"{ 'execute': 'query-migrate-parameters' }" ); + rsp_return =qdict_get_qdict (rsp,"return" ); + result =g_strdup_printf ("%" PRId64, +qdict_get_try_int (rsp_return, parameter,-1 )); + g_assert_cmpstr(result, ==, value); +QDECREF (rsp); +} +
tests/migration-test.c static void cleanup(const char *filename) · line 379
Quoted 10 lines
tests/migration-test.c +4
-1+static void migrate_set_downtime (QTestState *who,const double value) {QDict *rsp;gchar *cmd; +char *expected; +int64_t result_int; cmd =g_strdup_printf ("{ 'execute': 'migrate_set_downtime'," -"'arguments': { 'value': %s } }" , value); +"'arguments': { 'value': %g } }" , value);
I wonder if that will hit any FP representation problems for some values?
Quoted 31 lines
tests/migration-test.c +6
-1rsp =qtest_qmp (who, cmd);g_free (cmd);g_assert (qdict_haskey (rsp,"return" ));QDECREF (rsp); + result_int = value *1000L ; + expected =g_strdup_printf ("%" PRId64, result_int); +migrate_check_parameter (who,"downtime-limit" , expected); +g_free (expected); }static void migrate_set_speed (QTestState *who,const char *value)@@ -378,6 +398,7 @@ static void migrate_set_speed(QTestState *who, const char *value)g_free (cmd);g_assert (qdict_haskey (rsp,"return" ));QDECREF (rsp); +migrate_check_parameter (who,"max-bandwidth" , value); } static void migrate_set_capability(QTestState *who, const char *capability,@@ -509,7 +530,7 @@ static void test_migrate(void)* machine, so also set the downtime. */ migrate_set_speed (from,"100000000" ); -migrate_set_downtime (from,"0.001" ); +migrate_set_downtime (from,0.001 );/* Wait for the first serial output from the source */ wait_for_serial ("src_serial" );Signature · 1 line
2.13.6
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK
Re: [Qemu-devel] [PATCH v2 05/10] tests: check that migration parameters are really assigned
Quoted 36 lines · Dr. David Alan Gilbert
Quoted 35 lines · * Juan Quintela ([email protected]) wrote:
Signed-off-by Juan Quintela <[email protected]>--- tests/migration-test.c | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-)tests/migration-test.c +17
-1@@ -354,17 +354,37 @@ static void cleanup(const char *filename)g_free (path); } -static void migrate_set_downtime (QTestState *who,const char *value) +static void migrate_check_parameter (QTestState *who,const char *parameter, +const char *value) +{ +QDict *rsp, *rsp_return; +const char *result; + + rsp =wait_command (who,"{ 'execute': 'query-migrate-parameters' }" ); + rsp_return =qdict_get_qdict (rsp,"return" ); + result =g_strdup_printf ("%" PRId64, +qdict_get_try_int (rsp_return, parameter,-1 )); + g_assert_cmpstr(result, ==, value); +QDECREF (rsp); +} + +static void migrate_set_downtime (QTestState *who,const double value) {QDict *rsp;gchar *cmd; +char *expected; +int64_t result_int;
Quoted 6 lines
tests/migration-test.c static void cleanup(const char *filename) · line 379
Quoted 3 lines
tests/migration-test.c +1
-1cmd =g_strdup_printf ("{ 'execute': 'migrate_set_downtime'," -"'arguments': { 'value': %s } }" , value); +"'arguments': { 'value': %g } }" , value);I wonder if that will hit any FP representation problems for some values?
This is a deprecated function, so .....
Thanks, Juan.
Re: [Qemu-devel] [PATCH v2 05/10] tests: check that migration parameters are really assigned
In reply to Juan QuintelaQuoted 16 lines · Juan Quintela
Signed-off-by Juan Quintela <[email protected]>--- tests/migration-test.c | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-)tests/migration-test.c +2
-1@@ -354,17 +354,37 @@ static void cleanup(const char *filename)g_free (path); } -static void migrate_set_downtime (QTestState *who,const char *value) +static void migrate_check_parameter (QTestState *who,const char *parameter, +const char *value)
tests/migration-test.c static void cleanup(const char *filename) · line 368
Quoted 10 lines
tests/migration-test.c +10
-0+{ +QDict *rsp, *rsp_return; +const char *result; + + rsp =wait_command (who,"{ 'execute': 'query-migrate-parameters' }" ); + rsp_return =qdict_get_qdict (rsp,"return" ); + result =g_strdup_printf ("%" PRId64, +qdict_get_try_int (rsp_return, parameter,-1 )); + g_assert_cmpstr(result, ==, value); +QDECREF (rsp);
Maybe we need to free "result" as well? I see a pull request already, so maybe another fix patch on top. Thanks,
Quoted 43 lines
tests/migration-test.c +12
-2+} + +static void migrate_set_downtime (QTestState *who,const double value) {QDict *rsp;gchar *cmd; +char *expected; +int64_t result_int; cmd =g_strdup_printf ("{ 'execute': 'migrate_set_downtime'," -"'arguments': { 'value': %s } }" , value); +"'arguments': { 'value': %g } }" , value); rsp =qtest_qmp (who, cmd);g_free (cmd);g_assert (qdict_haskey (rsp,"return" ));QDECREF (rsp); + result_int = value *1000L ; + expected =g_strdup_printf ("%" PRId64, result_int); +migrate_check_parameter (who,"downtime-limit" , expected); +g_free (expected); }static void migrate_set_speed (QTestState *who,const char *value)@@ -378,6 +398,7 @@ static void migrate_set_speed(QTestState *who, const char *value)g_free (cmd);g_assert (qdict_haskey (rsp,"return" ));QDECREF (rsp); +migrate_check_parameter (who,"max-bandwidth" , value); } static void migrate_set_capability(QTestState *who, const char *capability,@@ -509,7 +530,7 @@ static void test_migrate(void)* machine, so also set the downtime. */ migrate_set_speed (from,"100000000" ); -migrate_set_downtime (from,"0.001" ); +migrate_set_downtime (from,0.001 );/* Wait for the first serial output from the source */ wait_for_serial ("src_serial" );Signature · 1 line
2.13.6
Signature · 1 line
Peter Xu
Re: [Qemu-devel] [PATCH v2 05/10] tests: check that migration parameters are really assigned
Quoted 14 lines · Peter Xu
Quoted 13 lines · Juan Quintela
Signed-off-by Juan Quintela <[email protected]>--- tests/migration-test.c | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-)tests/migration-test.c +0
-0@@ -354,17 +354,37 @@ static void cleanup(const char *filename)g_free (path); }
Quoted 16 lines
tests/migration-test.c static void cleanup(const char *filename) · line 368
Quoted 13 lines
tests/migration-test.c +12
-1-static void migrate_set_downtime (QTestState *who,const char *value) +static void migrate_check_parameter (QTestState *who,const char *parameter, +const char *value) +{ +QDict *rsp, *rsp_return; +const char *result; + + rsp =wait_command (who,"{ 'execute': 'query-migrate-parameters' }" ); + rsp_return =qdict_get_qdict (rsp,"return" ); + result =g_strdup_printf ("%" PRId64, +qdict_get_try_int (rsp_return, parameter,-1 )); + g_assert_cmpstr(result, ==, value); +QDECREF (rsp);Maybe we need to free "result" as well? I see a pull request already, so maybe another fix patch on top. Thanks,
Done, thanks.
Quoted 44 lines
Quoted 44 lines
tests/migration-test.c +12
-2+} + +static void migrate_set_downtime (QTestState *who,const double value) {QDict *rsp;gchar *cmd; +char *expected; +int64_t result_int; cmd =g_strdup_printf ("{ 'execute': 'migrate_set_downtime'," -"'arguments': { 'value': %s } }" , value); +"'arguments': { 'value': %g } }" , value); rsp =qtest_qmp (who, cmd);g_free (cmd);g_assert (qdict_haskey (rsp,"return" ));QDECREF (rsp); + result_int = value *1000L ; + expected =g_strdup_printf ("%" PRId64, result_int); +migrate_check_parameter (who,"downtime-limit" , expected); +g_free (expected); }static void migrate_set_speed (QTestState *who,const char *value)@@ -378,6 +398,7 @@ static void migrate_set_speed(QTestState *who, const char *value)g_free (cmd);g_assert (qdict_haskey (rsp,"return" ));QDECREF (rsp); +migrate_check_parameter (who,"max-bandwidth" , value); } static void migrate_set_capability(QTestState *who, const char *capability,@@ -509,7 +530,7 @@ static void test_migrate(void)* machine, so also set the downtime. */ migrate_set_speed (from,"100000000" ); -migrate_set_downtime (from,"0.001" ); +migrate_set_downtime (from,0.001 );/* Wait for the first serial output from the source */ wait_for_serial ("src_serial" );Signature · 1 line
2.13.6
PATCH v2 6/10 tests: Add migration precopy test
In reply to Juan Quintela--- tests/migration-test.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 66 insertions(+), 2 deletions(-)
tests/migration-test.c +66 -2
@@ -401,6 +401,22 @@ static void migrate_set_speed(QTestState *who, const char *value)migrate_check_parameter (who,"max-bandwidth" , value); } +static void migrate_set_parameter (QTestState *who,const char *parameter, +const char *value) +{ +QDict *rsp; +gchar *cmd; + + cmd =g_strdup_printf ("{ 'execute': 'migrate-set-parameters'," +"'arguments': { '%s': %s } }" , + parameter, value); + rsp =qtest_qmp (who, cmd); +g_free (cmd); +g_assert (qdict_haskey (rsp,"return" )); +QDECREF (rsp); +migrate_check_parameter (who, parameter, value); +} +static void migrate_set_capability (QTestState *who,const char *capability,const char *value) {
@@ -514,7 +530,7 @@ static void test_migrate_end(QTestState *from, QTestState *to)cleanup ("dest_serial" ); } -static void test_migrate (void ) +static void test_postcopy (void ) {char *uri =g_strdup_printf ("unix:%s/migsocket" , tmpfs);QTestState *from, *to;
@@ -557,6 +573,53 @@ static void test_migrate(void)test_migrate_end (from, to); } + +static void test_precopy (const char *uri) +{ +QTestState *from, *to; + +test_migrate_start (&from, &to, uri); + +/* We want to pick a speed slow enough that the test completes +* quickly, but that it doesn't complete precopy even on a slow +* machine, so also set the downtime. +*/ +/* 1 ms */ +migrate_set_parameter (from,"downtime-limit" ,"1" ); +/* 1GB/s slow*/ +migrate_set_parameter (from,"max-bandwidth" ,"1000000000" ); + + +/* Wait for the first serial output from the source */ +wait_for_serial ("src_serial" ); + +migrate (from, uri); + +wait_for_migration_pass (from); + +/* 1GB/s now it should converge */ +migrate_set_parameter (from,"downtime-limit" ,"300" ); + +if (!got_stop) { +qtest_qmp_eventwait (from,"STOP" ); + } + +qtest_qmp_eventwait (to,"RESUME" ); + +wait_for_serial ("dest_serial" ); +wait_for_migration_complete (from); + +test_migrate_end (from, to); +} + +static void test_precopy_unix (void ) +{ +char *uri =g_strdup_printf ("unix:%s/migsocket" , tmpfs); + +test_precopy (uri); +g_free (uri); +} +int main (int argc,char **argv) {char template[] ="/tmp/migration-test-XXXXXX" ;
@@ -576,7 +639,8 @@ int main(int argc, char **argv)module_call_init (MODULE_INIT_QOM ); -qtest_add_func ("/migration/postcopy/unix" , test_migrate); +qtest_add_func ("/migration/precopy/unix" , test_precopy_unix); +qtest_add_func ("/migration/postcopy/unix" , test_postcopy); ret =g_test_run ();
Signature · 1 line
2.13.6
Re: [Qemu-devel] [PATCH v2 06/10] tests: Add migration precopy test
Quoted 1 line · Juan Quintela
Signed-off-by Juan Quintela <[email protected]>
I am not sure whether some numbers below are the best, but I believe it should pass your smoke test at least, and I really want to have some migration unit tests there in master sonner or later (even, I would be happy if I can run them if I need to post another postcopy recovery series :-).
Thanks,
Quoted 107 lines
--- tests/migration-test.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 66 insertions(+), 2 deletions(-)tests/migration-test.c +66
-2@@ -401,6 +401,22 @@ static void migrate_set_speed(QTestState *who, const char *value)migrate_check_parameter (who,"max-bandwidth" , value); } +static void migrate_set_parameter (QTestState *who,const char *parameter, +const char *value) +{ +QDict *rsp; +gchar *cmd; + + cmd =g_strdup_printf ("{ 'execute': 'migrate-set-parameters'," +"'arguments': { '%s': %s } }" , + parameter, value); + rsp =qtest_qmp (who, cmd); +g_free (cmd); +g_assert (qdict_haskey (rsp,"return" )); +QDECREF (rsp); +migrate_check_parameter (who, parameter, value); +} +static void migrate_set_capability (QTestState *who,const char *capability,const char *value) {@@ -514,7 +530,7 @@ static void test_migrate_end(QTestState *from, QTestState *to)cleanup ("dest_serial" ); } -static void test_migrate (void ) +static void test_postcopy (void ) {char *uri =g_strdup_printf ("unix:%s/migsocket" , tmpfs);QTestState *from, *to;@@ -557,6 +573,53 @@ static void test_migrate(void)test_migrate_end (from, to); } + +static void test_precopy (const char *uri) +{ +QTestState *from, *to; + +test_migrate_start (&from, &to, uri); + +/* We want to pick a speed slow enough that the test completes +* quickly, but that it doesn't complete precopy even on a slow +* machine, so also set the downtime. +*/ +/* 1 ms */ +migrate_set_parameter (from,"downtime-limit" ,"1" ); +/* 1GB/s slow*/ +migrate_set_parameter (from,"max-bandwidth" ,"1000000000" ); + + +/* Wait for the first serial output from the source */ +wait_for_serial ("src_serial" ); + +migrate (from, uri); + +wait_for_migration_pass (from); + +/* 1GB/s now it should converge */ +migrate_set_parameter (from,"downtime-limit" ,"300" ); + +if (!got_stop) { +qtest_qmp_eventwait (from,"STOP" ); + } + +qtest_qmp_eventwait (to,"RESUME" ); + +wait_for_serial ("dest_serial" ); +wait_for_migration_complete (from); + +test_migrate_end (from, to); +} + +static void test_precopy_unix (void ) +{ +char *uri =g_strdup_printf ("unix:%s/migsocket" , tmpfs); + +test_precopy (uri); +g_free (uri); +} +int main (int argc,char **argv) {char template[] ="/tmp/migration-test-XXXXXX" ;@@ -576,7 +639,8 @@ int main(int argc, char **argv)module_call_init (MODULE_INIT_QOM ); -qtest_add_func ("/migration/postcopy/unix" , test_migrate); +qtest_add_func ("/migration/precopy/unix" , test_precopy_unix); +qtest_add_func ("/migration/postcopy/unix" , test_postcopy); ret =g_test_run ();Signature · 1 line
2.13.6
Signature · 1 line
Peter Xu
PATCH v2 7/10 tests: Add basic migration precopy tcp test
In reply to Juan Quintela--- tests/migration-test.c | 8 ++++++++ 1 file changed, 8 insertions(+)
tests/migration-test.c +8 -0
@@ -620,6 +620,13 @@ static void test_precopy_unix(void)g_free (uri); } +static void test_precopy_tcp (void ) +{ +const char *uri ="tcp:0:44444" ; + +test_precopy (uri); +} +int main (int argc,char **argv) {char template[] ="/tmp/migration-test-XXXXXX" ;
@@ -640,6 +647,7 @@ int main(int argc, char **argv)module_call_init (MODULE_INIT_QOM );qtest_add_func ("/migration/precopy/unix" , test_precopy_unix); +qtest_add_func ("/migration/precopy/tcp" , test_precopy_tcp);qtest_add_func ("/migration/postcopy/unix" , test_postcopy); ret =g_test_run ();
Signature · 1 line
2.13.6
PATCH v2 8/10 tests: Add precopy test using deprecated commands
In reply to Juan QuintelaOnce there, make postcopy test to use the new commands now that we have other test for deprecated ones
--- tests/migration-test.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-)
tests/migration-test.c +46 -2
@@ -545,8 +545,8 @@ static void test_postcopy(void)* quickly, but that it doesn't complete precopy even on a slow * machine, so also set the downtime. */ -migrate_set_speed (from,"100000000" ); -migrate_set_downtime (from,0.001 ); +migrate_set_parameter (from,"max-bandwidth" ,"1000000000" ); +migrate_set_parameter (from,"downtime-limit" ,"1" );/* Wait for the first serial output from the source */ wait_for_serial ("src_serial" );
@@ -573,6 +573,49 @@ static void test_postcopy(void)test_migrate_end (from, to); } +static void test_precopy_deprecated (const char *uri) +{ +QTestState *from, *to; + +test_migrate_start (&from, &to, uri); + +/* We want to pick a speed slow enough that the test completes +* quickly, but that it doesn't complete precopy even on a slow +* machine, so also set the downtime. +*/ +/* 100 ms */ +migrate_set_downtime (from,0.001 ); +/* 1MB/s slow*/ +migrate_set_speed (from,"1000000000" ); + +/* Wait for the first serial output from the source */ +wait_for_serial ("src_serial" ); + +migrate (from, uri); + +wait_for_migration_pass (from); + +/* 300ms it should converge */ +migrate_set_downtime (from,0.3 ); + +if (!got_stop) { +qtest_qmp_eventwait (from,"STOP" ); + } +qtest_qmp_eventwait (to,"RESUME" ); + +wait_for_serial ("dest_serial" ); +wait_for_migration_complete (from); + +test_migrate_end (from, to); +} + +static void test_deprecated_unix (void ) +{ +char *uri =g_strdup_printf ("unix:%s/migsocket" , tmpfs); + +test_precopy_deprecated (uri); +g_free (uri); +}static void test_precopy (const char *uri) {
@@ -648,6 +691,7 @@ int main(int argc, char **argv)qtest_add_func ("/migration/precopy/unix" , test_precopy_unix);qtest_add_func ("/migration/precopy/tcp" , test_precopy_tcp); +qtest_add_func ("/migration/deprecated/unix" , test_deprecated_unix);qtest_add_func ("/migration/postcopy/unix" , test_postcopy); ret =g_test_run ();
Signature · 1 line
2.13.6
Re: [Qemu-devel] [PATCH v2 08/10] tests: Add precopy test using deprecated commands
Quoted 51 lines · Juan Quintela
Once there, make postcopy test to use the new commands now that we have other test for deprecated ones
Signed-off-by Juan Quintela <[email protected]>--- tests/migration-test.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-)tests/migration-test.c +26
-2@@ -545,8 +545,8 @@ static void test_postcopy(void)* quickly, but that it doesn't complete precopy even on a slow * machine, so also set the downtime. */ -migrate_set_speed (from,"100000000" ); -migrate_set_downtime (from,0.001 ); +migrate_set_parameter (from,"max-bandwidth" ,"1000000000" ); +migrate_set_parameter (from,"downtime-limit" ,"1" );/* Wait for the first serial output from the source */ wait_for_serial ("src_serial" );@@ -573,6 +573,49 @@ static void test_postcopy(void)test_migrate_end (from, to); } +static void test_precopy_deprecated (const char *uri) +{ +QTestState *from, *to; + +test_migrate_start (&from, &to, uri); + +/* We want to pick a speed slow enough that the test completes +* quickly, but that it doesn't complete precopy even on a slow +* machine, so also set the downtime. +*/ +/* 100 ms */ +migrate_set_downtime (from,0.001 ); +/* 1MB/s slow*/ +migrate_set_speed (from,"1000000000" ); + +/* Wait for the first serial output from the source */ +wait_for_serial ("src_serial" ); + +migrate (from, uri); + +wait_for_migration_pass (from); + +/* 300ms it should converge */ +migrate_set_downtime (from,0.3 );
tests/migration-test.c static void test_postcopy(void) · line 609
Quoted 10 lines
tests/migration-test.c +10
-0+ +if (!got_stop) { +qtest_qmp_eventwait (from,"STOP" ); + } +qtest_qmp_eventwait (to,"RESUME" ); + +wait_for_serial ("dest_serial" ); +wait_for_migration_complete (from); + +test_migrate_end (from, to);
Again, instead of doing real migration to test deprecated commands, how about just set/check them one by one? After all we have migrate_check_parameter() now, which seems even easier than before.
Thanks,
Quoted 23 lines
tests/migration-test.c +10
-0+} + +static void test_deprecated_unix (void ) +{ +char *uri =g_strdup_printf ("unix:%s/migsocket" , tmpfs); + +test_precopy_deprecated (uri); +g_free (uri); +}static void test_precopy (const char *uri) {@@ -648,6 +691,7 @@ int main(int argc, char **argv)qtest_add_func ("/migration/precopy/unix" , test_precopy_unix);qtest_add_func ("/migration/precopy/tcp" , test_precopy_tcp); +qtest_add_func ("/migration/deprecated/unix" , test_deprecated_unix);qtest_add_func ("/migration/postcopy/unix" , test_postcopy); ret =g_test_run ();Signature · 1 line
2.13.6
Signature · 1 line
Peter Xu
PATCH v2 9/10 tests: Add migration xbzrle test
In reply to Juan Quintela--- tests/migration-test.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+)
tests/migration-test.c +66 -0
@@ -573,6 +573,19 @@ static void test_postcopy(void)test_migrate_end (from, to); } +static void migrate_set_cache_size (QTestState *who,const char *value) +{ +QDict *rsp; +gchar *cmd; + + cmd =g_strdup_printf ("{ 'execute': 'migrate-set-cache-size'," +"'arguments': { 'value': %s } }" , value); + rsp =qtest_qmp (who, cmd); +g_free (cmd); +g_assert (qdict_haskey (rsp,"return" )); +QDECREF (rsp); +} +static void test_precopy_deprecated (const char *uri) {QTestState *from, *to;
@@ -588,6 +601,9 @@ static void test_precopy_deprecated(const char *uri)/* 1MB/s slow*/ migrate_set_speed (from,"1000000000" ); +/* we don't use xbzrle here, but we test old commands */ +migrate_set_cache_size (from,"33554432" ); +/* Wait for the first serial output from the source */ wait_for_serial ("src_serial" );
@@ -670,6 +686,55 @@ static void test_precopy_tcp(void)test_precopy (uri); } +static void test_xbzrle (const char *uri) +{ +QTestState *from, *to; + +test_migrate_start (&from, &to, uri); + +/* We want to pick a speed slow enough that the test completes +* quickly, but that it doesn't complete precopy even on a slow +* machine, so also set the downtime. +*/ +/* 100 ms */ +migrate_set_parameter (from,"downtime-limit" ,"1" ); +/* 1MB/s slow*/ +migrate_set_parameter (from,"max-bandwidth" ,"1000000000" ); + +migrate_set_parameter (from,"xbzrle-cache-size" ,"33554432" ); + +migrate_set_capability (from,"xbzrle" ,"true" ); +migrate_set_capability (to,"xbzrle" ,"true" ); +/* Wait for the first serial output from the source */ +wait_for_serial ("src_serial" ); + +migrate (from, uri); + +wait_for_migration_pass (from); + +/* 300ms it should converge */ +migrate_set_parameter (from,"downtime-limit" ,"300" ); + +if (!got_stop) { +qtest_qmp_eventwait (from,"STOP" ); + } +qtest_qmp_eventwait (to,"RESUME" ); + +wait_for_serial ("dest_serial" ); +wait_for_migration_complete (from); + +test_migrate_end (from, to); +} + +static void test_xbzrle_unix (void ) +{ +char *uri =g_strdup_printf ("unix:%s/migsocket" , tmpfs); + +test_xbzrle (uri); +g_free (uri); +} + +int main (int argc,char **argv) {char template[] ="/tmp/migration-test-XXXXXX" ;
@@ -693,6 +758,7 @@ int main(int argc, char **argv)qtest_add_func ("/migration/precopy/tcp" , test_precopy_tcp);qtest_add_func ("/migration/deprecated/unix" , test_deprecated_unix);qtest_add_func ("/migration/postcopy/unix" , test_postcopy); +qtest_add_func ("/migration/xbzrle/unix" , test_xbzrle_unix); ret =g_test_run ();
Signature · 1 line
2.13.6
PATCH v2 10/10 tests: Add migration compress threads tests
In reply to Juan QuintelaYeap, it is still not working. trying to learn how to debug threads for guests running from the testt hardness.
For some reason, compression is not working at the moment, test is disabled until I found why.
--- tests/migration-test.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+)
tests/migration-test.c +51 -0
@@ -734,6 +734,54 @@ static void test_xbzrle_unix(void)g_free (uri); } +static void test_compress (const char *uri) +{ +QTestState *from, *to; + +test_migrate_start (&from, &to, uri); + +/* We want to pick a speed slow enough that the test completes +* quickly, but that it doesn't complete precopy even on a slow +* machine, so also set the downtime. +*/ +/* 100 ms */ +migrate_set_parameter (from,"downtime-limit" ,"100" ); +/* 1MB/s slow*/ +migrate_set_parameter (from,"max-bandwidth" ,"100000000" ); + +migrate_set_parameter (from,"compress-threads" ,"4" ); +migrate_set_parameter (from,"decompress-threads" ,"3" ); + +migrate_set_capability (from,"compress" ,"true" ); +migrate_set_capability (to,"compress" ,"true" ); +/* Wait for the first serial output from the source */ +wait_for_serial ("src_serial" ); + +migrate (from, uri); + +wait_for_migration_pass (from); + +/* 1GB/s now it should converge */ +migrate_set_parameter (from,"max-bandwidth" ,"1000000000" ); + +if (!got_stop) { +qtest_qmp_eventwait (from,"STOP" ); + } +qtest_qmp_eventwait (to,"RESUME" ); + +wait_for_serial ("dest_serial" ); +wait_for_migration_complete (from); + +test_migrate_end (from, to); +} + +static void test_compress_unix (void ) +{ +char *uri =g_strdup_printf ("unix:%s/migsocket" , tmpfs); + +test_compress (uri); +g_free (uri); +}int main (int argc,char **argv) {
@@ -759,6 +807,9 @@ int main(int argc, char **argv)qtest_add_func ("/migration/deprecated/unix" , test_deprecated_unix);qtest_add_func ("/migration/postcopy/unix" , test_postcopy);qtest_add_func ("/migration/xbzrle/unix" , test_xbzrle_unix); +if (0 ) { +qtest_add_func ("/migration/compress/unix" , test_compress_unix); + } ret =g_test_run ();
Signature · 1 line
2.13.6