Re: 10 more python test cases for rxe

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

 



On Wed, Oct 13, 2021 at 11:00 PM Jason Gunthorpe <jgg@xxxxxxxxxx> wrote:
>
> On Wed, Oct 13, 2021 at 09:43:28AM -0500, Bob Pearson wrote:
> > 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
> >
> >
> > +++ 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)):
>
> The pytests code is wrong - it should be querying the netdev through
> the verbs APIs, not hacking in sysfs like this.

Got it. Thanks

Zhu Yanjun

>
> Jason



[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