On Wed, Oct 04, 2017 at 12:39:28PM +0200, Juan Quintela wrote: [...]
(having some unit tests for migration is really good...) > +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. > + */ > + /* 100 ms */ > + migrate_set_parameter(from, "downtime-limit", "100"); > + /* 1MB/s slow*/ This is 100MB/s? > + migrate_set_parameter(from, "max-bandwidth", "100000000"); > + > + /* 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"); Curious: would it possible that 1GB/s won't suffice in some cases? Is there any reason behind this 1GB/s value? (I agree with Thomas that it would be good to work upon the existing postcopy-test.c file, at least easier to review :) Thanks, -- Peter Xu