tests: Fix test_mr_rereg_access
A message that is not in the archive (sent off-list or not yet received): [email protected]
RFC PATCH 1/1 tests: Fix test_mr_rereg_access
Subject: [PATCH RFC] tests: Fix test_mr_rereg_access
Date: Wed, 24 May 2023 15:19:26 -0500
From: Bob Pearson <[email protected]>
To: [email protected], [email protected], [email protected]
CC: Bob Pearson <[email protected]>
The test_mr_rereg_access and test_mr_rereg_bad_flow test cases modify the access permissions of an MR to add or remove remote write access. This may cause a change in the value of the MR rkey requiring that the players in the test re-exchange rkey state after the rereg_mr call but this is not done. This patch fixes this behavior.
Fixes 4bc72d894481 ("tests: Add rereg MR tests")
Signed-off-by Bob Pearson <[email protected]>
--- tests/test_mr.py | 2 ++ 1 file changed, 2 insertions(+)
tests/test_mr.py +2 -0
@@ -115,6 +115,7 @@ class MRTest(RDMATestCase): access = e.IBV_ACCESS_LOCAL_WRITE | e.IBV_ACCESS_REMOTE_WRITE self.server.rereg_mr(flags=e.IBV_REREG_MR_CHANGE_ACCESS, access=access) self.client.rereg_mr(flags=e.IBV_REREG_MR_CHANGE_ACCESS, access=access) + self.sync_remote_attr() u.rdma_traffic(**self.traffic_args, send_op=e.IBV_WR_RDMA_WRITE) def test_mr_rereg_access_bad_flow(self):
@@ -129,6 +130,7 @@ class MRTest(RDMATestCase): u.rdma_traffic(**self.traffic_args, send_op=e.IBV_WR_RDMA_WRITE) access = e.IBV_ACCESS_LOCAL_WRITE self.server.rereg_mr(flags=e.IBV_REREG_MR_CHANGE_ACCESS, access=access) + self.sync_remote_attr() with self.assertRaisesRegex(PyverbsRDMAError, 'Remote access error'): u.rdma_traffic(**self.traffic_args, send_op=e.IBV_WR_RDMA_WRITE)
Signature · 1 line
2.39.2