[Accel-config] [PATCH] accel-config: Fix ats_disable unit test

Xiaochen Shen <xiaochen.shen at intel.com>
Newsgroups dev.linux.lists.accel-config
Message-ID <[email protected]>
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>
---
 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;
 }
 
-- 
1.8.3.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.