Skip to content

Commit

Permalink
tests: Verify net interface support on RDMATestCase
Browse files Browse the repository at this point in the history
Verify net interface support on RDMATestCase.  Skip in case net
directory is not found, instead of raising an error.

Signed-off-by: Chen Brasch <cbrasch@amazon.com>
Signed-off-by: Gal Pressman <galpress@amazon.com>
  • Loading branch information
Chen Brasch authored and gal-pressman committed Jun 30, 2020
1 parent ea1dac8 commit b27e504
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/base.py
Expand Up @@ -203,6 +203,9 @@ def _add_gids_per_port(self, ctx, dev, port):
ctx.query_gid_type(port, idx) == e.IBV_GID_TYPE_ROCE_V2 and \
has_roce_hw_bug(vendor_id, vendor_pid):
continue
if not os.path.exists('/sys/class/infiniband/{}/device/net/'.format(dev)):
self.args.append([dev, port, idx, None])
continue
net_name = self.get_net_name(dev)
try:
ip_addr = self.get_ip_address(net_name)
Expand Down

0 comments on commit b27e504

Please sign in to comment.