-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Netkvm: Fix session handling issue during netkvm driver installation #4158
base: master
Are you sure you want to change the base?
Conversation
9655041
to
7622023
Compare
qemu/tests/single_driver_install.py
Outdated
|
||
ext_host = utils_net.get_ip_address_by_interface(ifname="%s" % params.get("netdst")) | ||
test.log.info("ext_host of netkvm adapte is %s" % ext_host) | ||
guest_ip = vm.get_address(1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious how to determine the ip owner? rtl8139 or virtio-net ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I use get_address function call to get my IP, and its parameter "1" comes from the "single_driver_install.cfg" file, where it is defined as nic_model_nic2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As our discussion, I changed "Index as 1" to "Name as nic2" now. This also works. Please review it when you are free. Thanks in advance.
4c4b0d8
to
088ff5f
Compare
Test Result: Fully passed on "--category=virtio_win_prewhql_acceptance --guestname=Win2016" |
if device_name[0:30] == "Red Hat VirtIO Ethernet Adapte": | ||
ext_host = utils_net.get_ip_address_by_interface(ifname="%s" % params.get("netdst")) | ||
test.log.info("ext_host of netkvm adapte is %s" % ext_host) | ||
guest_ip = vm.get_address("nic2") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please tell why using 'nic2' here? I thought it is similar with 'index2'. How about getting the ether name inside guest with some keywords, such as "Red Hat VirtIO Ethernet Adapte"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @xiagao, I used 'nic2' because it's the second element in the vm.virtnet
list. You can see vm.virtnet
code defined in this function: avocado-framework/avocado-vt/blob/master/virttest/virt_vm.py#L832.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And "nic2" has already been defined in our cfg file: tp-qemu/blob/master/qemu/tests/cfg/single_driver_install.cfg#L56.
44dedb2
to
cfcae03
Compare
During acceptance testing, installing the netkvm driver on an existing network interface caused session handling issues, leading to test failures. This patch changes the session handling from SSH to serial session by replacing vm.wait_for_login() with vm.wait_for_serial_login() . It also adds a ping test to verify network connectivity after the driver installation. Signed-off-by: wji <[email protected]>
cfcae03
to
217316a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK.
Hi @leidwang, Could you help review it when you have times? Thanks :) |
During acceptance testing, installing the netkvm driver on an existing network interface caused session handling issues, leading to test failures. This patch changes the session handling from SSH to serial session by replacing vm.wait_for_login() with vm.wait_for_serial_login() . It also adds a ping test to verify network connectivity after the driver installation.
ID: 1382
Signed-off-by: wji [email protected]