Fwd: [PATCH RFC] tests: Fix test_mr_rereg_access

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Subject: [PATCH RFC] tests: Fix test_mr_rereg_access
Date: Wed, 24 May 2023 15:19:26 -0500
From: Bob Pearson <rpearsonhpe@xxxxxxxxx>
To: edwards@xxxxxxxxxx, idok@xxxxxxxxxx, jgg@xxxxxxxxxx
CC: Bob Pearson <rpearsonhpe@xxxxxxxxx>

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 <rpearsonhpe@xxxxxxxxx>
---
 tests/test_mr.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/test_mr.py b/tests/test_mr.py
index 6b97e636..534df46a 100644
--- a/tests/test_mr.py
+++ b/tests/test_mr.py
@@ -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)
 
-- 
2.39.2




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux