Skip to contentSkip to conversation

tests: Fix test_mr_rereg_access

RFC PATCH New Bob Pearson 1 participant 1 message May 24, 2023 1 message not in the archive InfiniBand

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

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")
---
 tests/test_mr.py | 2 ++
 1 file changed, 2 insertions(+)
tests/test_mr.py +2 -0
index 6b97e636..534df46a 100644
@@ -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