-
Notifications
You must be signed in to change notification settings - Fork 170
passt/function: fix for multi-arch #5382
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,17 +52,17 @@ def run(test, params, env): | |
test_passwd) | ||
host_session.close() | ||
|
||
host_ip = utils_net.get_host_ip_address(ip_ver='ipv4') | ||
params['host_ip_v6'] = host_ip_v6 = utils_net.get_host_ip_address( | ||
ip_ver='ipv6') | ||
host_iface = params.get('host_iface') | ||
host_iface = host_iface if host_iface else utils_net.get_net_if( | ||
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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I don't understand. The host_iface value would be used later to set the dev value l. 86.
At this point, I have a test environment like on x86_64 without dhcp. Therefore the check is not needed IMO. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Oh, sorry, I misunderstood it.
Okay, then it should work properly. |
||
params['socket_dir'] = socket_dir = eval(params.get('socket_dir')) | ||
params['proc_checks'] = proc_checks = eval(params.get('proc_checks', '{}')) | ||
vm_iface = params.get('vm_iface', 'eno1') | ||
mtu = params.get('mtu') | ||
outside_ip = params.get('outside_ip') | ||
host_iface = params.get('host_iface') | ||
host_iface = host_iface if host_iface else utils_net.get_net_if( | ||
state="UP")[0] | ||
log_file = f'/run/user/{user_id}/passt.log' | ||
iface_attrs = eval(params.get('iface_attrs')) | ||
iface_attrs['backend']['logFile'] = log_file | ||
|
@@ -97,7 +97,7 @@ def run(test, params, env): | |
test.fail(f'Logfile of passt "{log_file}" not created') | ||
|
||
session = vm.wait_for_serial_login(timeout=60) | ||
passt.check_vm_ip(iface_attrs, session, host_iface) | ||
passt.check_vm_ip(iface_attrs, session, host_iface, vm_iface) | ||
passt.check_vm_mtu(session, vm_iface, mtu) | ||
passt.check_default_gw(session) | ||
passt.check_nameserver(session) | ||
|
@@ -111,10 +111,12 @@ def run(test, params, env): | |
|
||
firewalld.stop() | ||
LOG.debug(f'Status of firewalld: {firewalld.status()}') | ||
passt.check_connection(vm, vm_iface, ['TCP4', 'TCP6', 'UDP4', 'UDP6']) | ||
passt.check_connection(vm, vm_iface, | ||
['TCP4', 'TCP6', 'UDP4', 'UDP6'], | ||
host_iface) | ||
|
||
if 'portForwards' in iface_attrs: | ||
passt.check_portforward(vm, host_ip, params) | ||
passt.check_portforward(vm, host_ip, params, host_iface) | ||
|
||
vm_sess = vm.wait_for_serial_login(timeout=60) | ||
vm_sess.cmd('systemctl start firewalld') | ||
|
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.
good catch!