|
5 | 5 |
|
6 | 6 | from virttest import error_context
|
7 | 7 | from virttest import utils_misc
|
| 8 | +from virttest import utils_net |
8 | 9 | from virttest.utils_windows import virtio_win, wmic
|
9 | 10 | from virttest.utils_test.qemu import windrv_verify_running
|
10 | 11 |
|
@@ -144,7 +145,8 @@ def run(test, params, env):
|
144 | 145 | vm.destroy()
|
145 | 146 | vm.create()
|
146 | 147 | vm = env.get_vm(params["main_vm"])
|
147 |
| - session = vm.wait_for_login() |
| 148 | + # This is a workaround for session logout issue |
| 149 | + session = vm.wait_for_serial_login() |
148 | 150 | else:
|
149 | 151 | session = vm.reboot(session)
|
150 | 152 |
|
@@ -172,6 +174,15 @@ def run(test, params, env):
|
172 | 174 | if not utils_misc.wait_for(lambda: not session.cmd_status(chk_cmd),
|
173 | 175 | 600, 60, 10):
|
174 | 176 | test.fail("Failed to install driver '%s'" % driver_name)
|
| 177 | + if device_name[0:30] == "Red Hat VirtIO Ethernet Adapte": |
| 178 | + ext_host = utils_net.get_ip_address_by_interface(ifname="%s" % params.get("netdst")) |
| 179 | + test.log.info("ext_host of netkvm adapte is %s" % ext_host) |
| 180 | + guest_ip = vm.get_address("nic2") |
| 181 | + test.log.info("guest_ip of netkvm adapte is %s" % guest_ip) |
| 182 | + status, output = utils_net.ping( |
| 183 | + ext_host, interface=guest_ip, count=10, timeout=60, session=session) |
| 184 | + if status: |
| 185 | + test.fail("Ping %s failed, output=%s" % (ext_host, output)) |
175 | 186 |
|
176 | 187 | installed_any |= True
|
177 | 188 | if not installed_any:
|
|
0 commit comments