[PATCH rdma-core 5/5] tests: Bug fix for get_access_flags()

Xiong, Jianxin jianxin.xiong at intel.com
Tue Nov 24 20:43:37 UTC 2020


> -----Original Message-----
> From: John Hubbard <jhubbard at nvidia.com>
> Sent: Tuesday, November 24, 2020 12:27 PM
> To: Xiong, Jianxin <jianxin.xiong at intel.com>; linux-rdma at vger.kernel.org; dri-devel at lists.freedesktop.org
> Cc: Doug Ledford <dledford at redhat.com>; Jason Gunthorpe <jgg at ziepe.ca>; Leon Romanovsky <leon at kernel.org>; Sumit Semwal
> <sumit.semwal at linaro.org>; Christian Koenig <christian.koenig at amd.com>; Vetter, Daniel <daniel.vetter at intel.com>
> Subject: Re: [PATCH rdma-core 5/5] tests: Bug fix for get_access_flags()
> 
> Just some silly nits I stumbled across while trying to understand the tests.
> 
> On 11/23/20 9:53 AM, Jianxin Xiong wrote:
> > The filter defintion is wrong and causes get_access_flags() always
> 
>               definition

Thanks.

> 
> > returning empty list. As the result the MR tests using this function
> > are effectively skipped (but report success).
> >
> > Also fix a typo in the comments.
> 
> Was there another typo somewhere? All I see is an *added* typo...
> 
> >
> > Signed-off-by: Jianxin Xiong <jianxin.xiong at intel.com>
> > ---
> >   tests/utils.py | 6 +++---
> >   1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/tests/utils.py b/tests/utils.py index 0ad7110..eee44b4
> > 100644
> > --- a/tests/utils.py
> > +++ b/tests/utils.py
> > @@ -55,8 +55,8 @@ def filter_illegal_access_flags(element):
> >       :param element: A list of access flags to check
> >       :return: True if this list is legal, else False
> >       """
> > -    if e.IBV_ACCESS_REMOTE_ATOMIC in element or e.IBV_ACCESS_REMOTE_WRITE:
> > -        if e.IBV_ACCESS_LOCAL_WRITE:
> > +    if e.IBV_ACCESS_REMOTE_ATOMIC in element or e.IBV_ACCESS_REMOTE_WRITE in element:
> > +        if not e.IBV_ACCESS_LOCAL_WRITE in element:
> >               return False
> >       return True
> >
> > @@ -69,7 +69,7 @@ def get_access_flags(ctx):
> >       added as well.
> >       After verifying that the flags selection is legal, it is appended to an
> >       array, assuming it wasn't previously appended.
> > -    :param ctx: Device Context to check capabilities
> > +    :param ctx: Device Coyyntext to check capabilities
> 
> I liked the old spelling. "Coyyntext" just doesn't sound as good. :)

Hmm, I don't know what happened 😊 I was seeing the other way around.

> 
> >       :param num: Size of initial collection
> >       :return: A random legal value for MR flags
> >       """
> >
> 
> thanks,
> --
> John Hubbard
> NVIDIA


More information about the dri-devel mailing list