提交 eeb568dc 编写于 作者: L Lukáš Doktor

qemu..migration: Run pre_migrate before each iteration

Previously the "pre_migrate" function was only executed before the first
iteration, but at least for mig_set_speed it's required before each
iteration.

As for the "check_dma" function, it also makes sense to run it for each
iteration and code-wise should work well, but because of outdated
code-path I have only tested it with slighly modified version (without
dmesg check on virtio_blk).

Note the migration_with_speed_measurement test is not affected as it's
located in a different file.
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
上级 c61e1039
......@@ -199,11 +199,6 @@ def run(test, params, env):
test.error("migration bg check command failed")
session2.close()
# run some functions before migrate start.
pre_migrate = get_functions(params.get("pre_migrate"), globals())
for func in pre_migrate:
func(vm, params, test)
# Start stress test in guest.
guest_stress_test = params.get("guest_stress_test")
if guest_stress_test:
......@@ -219,10 +214,14 @@ def run(test, params, env):
target_mig_parameters = params.get("target_migrate_parameters", "None")
target_mig_parameters = ast.literal_eval(target_mig_parameters)
migrate_parameters = (mig_parameters, target_mig_parameters)
pre_migrate = get_functions(params.get("pre_migrate"), globals())
# Migrate the VM
ping_pong = params.get("ping_pong", 1)
for i in range(int(ping_pong)):
# run some functions before migrate start
for func in pre_migrate:
func(vm, params, test)
if i % 2 == 0:
logging.info("Round %s ping..." % str(i / 2))
else:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册