10 more python test cases for rxe

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

 



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



[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