public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* 10 more python test cases for rxe
@ 2021-10-13 14:43 Bob Pearson
  2021-10-13 15:00 ` Jason Gunthorpe
  0 siblings, 1 reply; 6+ messages in thread
From: Bob Pearson @ 2021-10-13 14:43 UTC (permalink / raw)
  To: Zhu Yanjun; +Cc: Jason Gunthorpe, Leon Romanovsky, linux-rdma@vger.kernel.org

Zhu,

There are about 10 test cases in the python suite that do not run for rxe because

	... skipped "Device rxe0 doesn't have net interface"

Clearly this is wrong and I don't know how to address the root cause yet but the following
hack where enp0s3 is the actual net device that rxe0 is based on in my case enables these
test cases to run and it appears they all do.

diff --git a/tests/base.py b/tests/base.py

index 3460c546..d6fd29b8 100644

--- a/tests/base.py

+++ b/tests/base.py

@@ -240,10 +240,11 @@ class RDMATestCase(unittest.TestCase):

             if self.gid_type is not None and ctx.query_gid_type(port, idx) != \

                     self.gid_type:

                 continue

-            if not os.path.exists('/sys/class/infiniband/{}/device/net/'.format(dev)):

-                self.args.append([dev, port, idx, None, None])

-                continue

-            net_name = self.get_net_name(dev)

+            #if not os.path.exists('/sys/class/infiniband/{}/device/net/'.format(dev)):

+                #self.args.append([dev, port, idx, None, None])

+                #continue

+            #net_name = self.get_net_name(dev)

+            net_name = "enp0s3"

             try:

                 ip_addr, mac_addr = self.get_ip_mac_address(net_name)

             except (KeyError, IndexError):


Apparently base.py expects there to be a directory /sys/class/infiniband/rxe0/device/net
that contains another directory with the same name as enp0s3. When rdma-core builds the
kobj tree 'device/net' is not added to rxe0. There is a 'parent' plain file in rxe0 with
the contents enp0s3 so there should be an easy work around in base.py but I don't know if
there are other places where the 'device/net' branch is expected.

If you know the best approach to fixing this please let me know. In the mean time this
gives you a way to run the rdmacm test cases.

Bob

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-10-20 12:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-13 14:43 10 more python test cases for rxe Bob Pearson
2021-10-13 15:00 ` Jason Gunthorpe
2021-10-14 12:36   ` Zhu Yanjun
2021-10-20 10:27     ` Edward Srouji
2021-10-20 11:39       ` Jason Gunthorpe
2021-10-20 12:52       ` Yanjun Zhu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox