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

John Hubbard jhubbard at nvidia.com
Tue Nov 24 20:26:59 UTC 2020


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 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. :)

>       :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