Skip to content
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

passt/function: fix for multi-arch #5382

Merged
merged 1 commit into from
Jan 17, 2024
Merged

Conversation

smitterl
Copy link
Contributor

@smitterl smitterl commented Jan 8, 2024

Depends on #5361

  1. Configure values for s390x
  2. Get IP addresses by host interface to avoid issues when there's more than one functional NIC.
  3. Use the host_iface in several functions to make sure the right interface is tested.
  4. The test needs to check the ports on the host not in the guest. Therefore, configure the host_iface.

@smitterl smitterl marked this pull request as draft January 8, 2024 18:32
@smitterl
Copy link
Contributor Author

smitterl commented Jan 8, 2024

Expect checks to pass after dependency has been merged.

@smitterl
Copy link
Contributor Author

smitterl commented Jan 8, 2024

@chloerh @yalzhang please help review
@dzhengfy for visibility on arm

tcp_port_list = [f'{host_ip}%{vm_iface}:31339', f'[{host_ip_v6}]%{vm_iface}:51339']
udp_port_list = [f'{host_ip}%{vm_iface}:2025']
tcp_port_list = [f'{host_ip}%{host_iface}:31339', f'[{host_ip_v6}]%{host_iface}:51339']
udp_port_list = [f'{host_ip}%{host_iface}:2025']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch!

state="UP")[0]
host_ip = utils_net.get_ip_address_by_interface(host_iface, ip_ver='ipv4')
host_ip_v6 = utils_net.get_ip_address_by_interface(host_iface, ip_ver='ipv6')
params['host_ip_v6'] = host_ip_v6
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can check the interface xml first, if the "dev" is specified, use it directly. If it is null, try to get the host_iface then. And for the host_ip_v6, if the host interface has 2 global ipv6 addresses(like in your test env.), it will use the more specific one - the one got by dhcp with prefix length as 128. Do we need to add some check here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can check the interface xml first, if the "dev" is specified, use it directly.

I don't understand. The host_iface value would be used later to set the dev value l. 86.

if the host interface has 2 global ipv6 addresses(like in your test env.), it will use the more specific one - the one got by dhcp with prefix length as 128. Do we need to add some check here?

At this point, I have a test environment like on x86_64 without dhcp. Therefore the check is not needed IMO.

Copy link
Contributor

@yalzhang yalzhang Jan 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The host_iface value would be used later to set the dev value l. 86.

Oh, sorry, I misunderstood it.

At this point, I have a test environment like on x86_64 without dhcp. Therefore the check is not needed IMO.

Okay, then it should work properly.

@smitterl smitterl marked this pull request as ready for review January 12, 2024 07:59
1. Configure values for s390x
2. Get IP addresses by host interface to avoid issues when
   there's more than one functional NIC.
3. Use the host_iface in several functions to make sure the right
   interface is tested.
4. The test needs to check the ports on the host not in the guest.
   Therefore, configure the host_iface.

Signed-off-by: Sebastian Mitterle <[email protected]>
@chloerh chloerh merged commit ba39c8f into autotest:master Jan 17, 2024
5 checks passed
@smitterl smitterl deleted the passt_function branch July 26, 2024 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants