Content-Type: multipart/mixed; boundary="===============2776657254242363033==" MIME-Version: 1.0 From: ramesh.thomas at intel.com Subject: [Accel-config] [PATCH 3/3] accel-config/test: Skip shared wq config test if shm support Date: Wed, 11 Aug 2021 22:34:28 -0400 Message-ID: <20210812023428.1185313-4-ramesh.thomas@intel.com> In-Reply-To: 20210812023428.1185313-1-ramesh.thomas@intel.com To: accel-config@lists.01.org List-ID: --===============2776657254242363033== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Ramesh Thomas Skip config tests that use shared wqs if shared memory support is not available. Signed-off-by: Ramesh Thomas --- test/libaccfg.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/test/libaccfg.c b/test/libaccfg.c index 9ac4bcd..5a17650 100644 --- a/test/libaccfg.c +++ b/test/libaccfg.c @@ -244,7 +244,9 @@ static int config_wq(struct accfg_ctx *ctx, struct accf= g_device *device, { int rc =3D 0; = - SET_ERR(rc, accfg_wq_set_str_mode(wq, wq_param->mode)); + rc =3D accfg_wq_set_str_mode(wq, wq_param->mode); + if (rc) + return rc; SET_ERR(rc, accfg_wq_set_str_type(wq, wq_param->type)); SET_ERR(rc, accfg_wq_set_str_name(wq, wq_param->name)); SET_ERR(rc, accfg_wq_set_size(wq, wq_param->wq_size)); @@ -677,8 +679,14 @@ static int test_config_shared(struct accfg_ctx *ctx) return rc; = rc =3D set_config(ctx, &test_ctx, "shared"); - if (rc) + if (rc) { + if (rc =3D=3D -EINVAL) { + fprintf(stderr, "shared wq support not available\n"); + device_test_reset(ctx, test_ctx.device, false); + return -EOPNOTSUPP; + } return rc; + } = rc =3D check_config(ctx, &test_ctx, "shared"); if (rc) -- = 2.26.3 --===============2776657254242363033==--