Skip to content

Commit

Permalink
pyverbs: Delete all tests that generates mlx5 CQE errors
Browse files Browse the repository at this point in the history
Library shouldn't print anything to stdout and mlx5 shouldn't be
exclusion here. Delete all pyverbs tests that generate CQE errors
in mlx5, till the developers will fix it.

Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
  • Loading branch information
rleon committed Aug 9, 2020
1 parent 568ad09 commit a48b9b1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 73 deletions.
30 changes: 0 additions & 30 deletions tests/test_mr.py
Expand Up @@ -312,42 +312,12 @@ def test_mw_type1(self):
u.rdma_traffic(self.client, self.server, self.iters, self.gid_index,
self.ib_port, send_op=e.IBV_WR_RDMA_WRITE)

def test_invalidate_mw_type1(self):
self.test_mw_type1()
self.invalidate_mw_type1()
with self.assertRaisesRegex(PyverbsRDMAError, 'Remote access error'):
u.rdma_traffic(self.client, self.server, self.iters, self.gid_index,
self.ib_port, send_op=e.IBV_WR_RDMA_WRITE)

def test_mw_type2(self):
self.create_players(MWRC, mw_type=e.IBV_MW_TYPE_2)
self.bind_mw_type_2()
u.rdma_traffic(self.client, self.server, self.iters, self.gid_index,
self.ib_port, send_op=e.IBV_WR_RDMA_WRITE)

def test_mw_type2_invalidate_local(self):
self.test_mw_type2()
self.invalidate_mw_type2_local()
with self.assertRaisesRegex(PyverbsRDMAError, 'Remote access error'):
u.rdma_traffic(self.client, self.server, self.iters, self.gid_index,
self.ib_port, send_op=e.IBV_WR_RDMA_WRITE)

def test_mw_type2_invalidate_remote(self):
self.test_mw_type2()
self.invalidate_mw_type2_remote()
with self.assertRaisesRegex(PyverbsRDMAError, 'Remote access error'):
u.rdma_traffic(self.client, self.server, self.iters, self.gid_index,
self.ib_port, send_op=e.IBV_WR_RDMA_WRITE)

def test_mw_type2_invalidate_dealloc(self):
self.test_mw_type2()
# Dealloc the MW by closing the pyverbs objects.
self.server.mw.close()
self.client.mw.close()
with self.assertRaisesRegex(PyverbsRDMAError, 'Remote access error'):
u.rdma_traffic(self.client, self.server, self.iters, self.gid_index,
self.ib_port, send_op=e.IBV_WR_RDMA_WRITE)

def test_reg_mw_wrong_type(self):
"""
Verify that trying to create a MW of a wrong type fails
Expand Down
43 changes: 0 additions & 43 deletions tests/test_qpex.py
Expand Up @@ -259,46 +259,3 @@ def test_qp_ex_rc_atomic_fetch_add(self):
server.mr.write('s' * 8, 8)
u.rdma_traffic(client, server, self.iters, self.gid_index, self.ib_port,
new_send=True, send_op=e.IBV_QP_EX_WITH_ATOMIC_FETCH_AND_ADD)

def test_qp_ex_rc_bind_mw(self):
"""
Verify bind memory window operation using the new post_send API.
Instead of checking through regular pingpong style traffic, we'll
do as follows:
- Register an MR with remote write access
- Bind a MW without remote write permission to the MR
- Verify that remote write fails
Since it's a unique flow, it's an integral part of that test rather
than a utility method.
"""
client, server = self.create_players('rc_bind_mw')
client_sge = u.get_send_elements(client, False)[1]
# Create a MW and bind it
server.qp.wr_start()
server.qp.wr_id = 0x123
server.qp.wr_flags = e.IBV_SEND_SIGNALED
bind_info = MWBindInfo(server.mr, server.mr.buf, server.mr.length,
e.IBV_ACCESS_LOCAL_WRITE)
try:
mw = MW(server.pd, mw_type=e.IBV_MW_TYPE_2)
except PyverbsRDMAError as ex:
if ex.error_code == errno.EOPNOTSUPP:
raise unittest.SkipTest('Memory Window allocation is not supported')
raise ex
new_key = inc_rkey(server.mr.rkey)
server.qp.wr_bind_mw(mw, new_key, bind_info)
server.qp.wr_complete()
u.poll_cq(server.cq)
# Verify that remote write fails
client.qp.wr_start()
client.qp.wr_id = 0x124
client.qp.wr_flags = e.IBV_SEND_SIGNALED
client.qp.wr_rdma_write(new_key, server.mr.buf)
client.qp.wr_set_sge(client_sge)
client.qp.wr_complete()
try:
u.poll_cq(client.cq)
except PyverbsRDMAError as ex:
if ex.error_code != e.IBV_WC_REM_ACCESS_ERR:
raise ex

0 comments on commit a48b9b1

Please sign in to comment.