Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions io/net/infiniband/ping6.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,10 @@ def setUp(self):
device = self.params.get("interface", default=None)
if device in interfaces:
self.iface = device
elif local.validate_mac_addr(device) and device in local.get_all_hwaddr():
self.iface = local.get_interface_by_hwaddr(device).name
elif local.validate_mac_addr(device):
if device in local.get_all_hwaddr():
self.iface = local.get_interface_by_hwaddr(
device).name
else:
self.iface = None
self.cancel("%s interface is not available" % device)
Expand Down Expand Up @@ -99,7 +101,9 @@ def setUp(self):
except Exception:
self.networkinterface.save(self.ipaddr, self.netmask)
self.networkinterface.bring_up()
process.system("ifup %s" % self.iface)
if not self.networkinterface.is_link_up():
self.fail("failed to bring up the interface after ip address \
is added to the interfaces")
self.session = Session(self.peer_ip, user=self.peer_user,
password=self.peer_password)
if self.iface not in interfaces:
Expand Down
10 changes: 7 additions & 3 deletions io/net/infiniband/rping.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,10 @@ def setUp(self):
device = self.params.get("interface", default=None)
if device in interfaces:
self.iface = device
elif local.validate_mac_addr(device) and device in local.get_all_hwaddr():
self.iface = local.get_interface_by_hwaddr(device).name
elif local.validate_mac_addr(device):
if device in local.get_all_hwaddr():
self.iface = local.get_interface_by_hwaddr(
device).name
else:
self.iface = None
self.cancel("%s interface is not available" % device)
Expand Down Expand Up @@ -99,7 +101,9 @@ def setUp(self):
except Exception:
self.networkinterface.save(self.ipaddr, self.netmask)
self.networkinterface.bring_up()
process.system("ifup %s" % self.iface)
Comment thread
PavamanSubramaniyam marked this conversation as resolved.
if not self.networkinterface.is_link_up():
self.fail("Failed to bring up the interface after ip address \
is added to the interfaces")
self.timeout = 120
self.local_ip = netifaces.ifaddresses(self.iface)[AF_INET][0]['addr']
self.option = self.option.replace("peer_ipv6", self.ipv6_peer)
Expand Down
Loading