提交 1dbec5bc 编写于 作者: A Amos Kong 提交者: Lucas Meneghel Rodrigues

qemu.tests: nic_hotplug: Add a regression test

Add regress test for bug: Fix phys memory client for vhost

Stop/continue guest after hot-adding a nic, guest will
be panic, or guest network will be down.
Signed-off-by: NAmos Kong <akong@redhat.com>
Acked-by: NGolita Yue <gyue@redhat.com>
上级 9413fc52
......@@ -70,10 +70,16 @@ def run_nic_hotplug(test, params, env):
logging.info("Got the ip address of new nic: %s", ip)
logging.info("Ping test the new nic ...")
s, o = utils_test.ping(ip, 100)
s, o = utils_test.ping(ip, 10, timeout=15)
if s != 0:
logging.error(o)
raise error.TestFail("New nic failed ping test")
vm.monitor.cmd("stop")
vm.monitor.cmd("cont")
s, o = utils_test.ping(ip, 10, timeout=15)
if s != 0:
logging.error(o)
raise error.TestFail("New nic failed ping test after stop/cont")
logging.info("Detaching the previously attached nic from vm")
vm.hotunplug_nic(nic_name)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册