Message ID | 1606153984-104583-6-git-send-email-jianxin.xiong@intel.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Add user space dma-buf support | expand |
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 > 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@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. :) > :param num: Size of initial collection > :return: A random legal value for MR flags > """ > thanks,
> -----Original Message----- > From: John Hubbard <jhubbard@nvidia.com> > Sent: Tuesday, November 24, 2020 12:27 PM > To: Xiong, Jianxin <jianxin.xiong@intel.com>; linux-rdma@vger.kernel.org; dri-devel@lists.freedesktop.org > Cc: Doug Ledford <dledford@redhat.com>; Jason Gunthorpe <jgg@ziepe.ca>; Leon Romanovsky <leon@kernel.org>; Sumit Semwal > <sumit.semwal@linaro.org>; Christian Koenig <christian.koenig@amd.com>; Vetter, Daniel <daniel.vetter@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@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
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 :param num: Size of initial collection :return: A random legal value for MR flags """
The filter defintion is wrong and causes get_access_flags() always 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. Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com> --- tests/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)