On 7/16/2021 4:41 AM, Xiaochen Shen wrote:
Don't fail test if per wq ats disable is not supported.
Fixes: 7de00a1e1a58 ("accel-config: Add ats_disable unit test")
Signed-off-by: Xiaochen Shen <xiaochen.shen(a)intel.com>
Reviewed-by: Dave
Jiang <dave.jiang(a)intel.com>
> ---
> test/libaccfg.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/test/libaccfg.c b/test/libaccfg.c
> index 7849d63..1816f8e 100644
> --- a/test/libaccfg.c
> +++ b/test/libaccfg.c
> @@ -254,10 +254,14 @@ static int config_wq(struct accfg_ctx *ctx, struct accfg_device
*device,
> SET_ERR(rc, accfg_wq_set_max_batch_size(wq, wq_param->max_batch_size));
> SET_ERR(rc, accfg_wq_set_max_transfer_size(wq,
> wq_param->max_transfer_size));
> - SET_ERR(rc, accfg_wq_set_ats_disable(wq, wq_param->ats_disable));
> if (wq_param->threshold)
> SET_ERR(rc, accfg_wq_set_threshold(wq, wq_param->threshold));
>
> + SET_ERR(rc, accfg_wq_set_ats_disable(wq, wq_param->ats_disable));
> + /* Don't fail test if per wq ats disable is not supported */
> + if (rc == -EOPNOTSUPP)
> + rc = 0;
> +
> return rc;
> }
>