public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Bob Pearson <rpearsonhpe@gmail.com>
To: Zhu Yanjun <zyjzyj2000@gmail.com>
Cc: Jason Gunthorpe <jgg@nvidia.com>,
	Leon Romanovsky <leon@kernel.org>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>
Subject: 10 more python test cases for rxe
Date: Wed, 13 Oct 2021 09:43:28 -0500	[thread overview]
Message-ID: <34a9a53f-1f1f-bddb-0c8e-63ec5fbcd28e@gmail.com> (raw)

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

             reply	other threads:[~2021-10-13 14:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-13 14:43 Bob Pearson [this message]
2021-10-13 15:00 ` 10 more python test cases for rxe 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=34a9a53f-1f1f-bddb-0c8e-63ec5fbcd28e@gmail.com \
    --to=rpearsonhpe@gmail.com \
    --cc=jgg@nvidia.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=zyjzyj2000@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox