Skip to content

Commit

Permalink
cxi/prov: Fix deferred work test
Browse files Browse the repository at this point in the history
Rgroups implementation requires resource_limits true to use the service.
Only verify extra queue work for limited test.

NETCASSINI-6912

Signed-off-by: Chuck Fossen <[email protected]>
  • Loading branch information
Chuck Fossen authored and swelch committed Nov 26, 2024
1 parent ae9480b commit 2ad2e37
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions prov/cxi/test/deferred_work.c
Original file line number Diff line number Diff line change
Expand Up @@ -960,6 +960,7 @@ static int alloc_service(struct cxil_dev *dev, unsigned int tle_count)
struct cxi_svc_fail_info fail_info = {};
struct cxi_svc_desc svc_desc = {
.enable = 1,
.resource_limits = 1,
.limits = {
.type[CXI_RSRC_TYPE_PTE] = {
.max = 100,
Expand Down Expand Up @@ -1195,11 +1196,10 @@ Test(deferred_work_trig_op_limit, enforce_limit_single_thread)
cr_assert_eq(ret, FI_SUCCESS, "FI_QUEUE_WORK iter %d failed %d", i, ret);
}

ret = fi_control(&res.dom->fid, FI_QUEUE_WORK, &work);
if (limited)
if (limited) {
ret = fi_control(&res.dom->fid, FI_QUEUE_WORK, &work);
cr_assert_eq(ret, -FI_ENOSPC, "FI_QUEUE_WORK failed %d", ret);
else
cr_assert_eq(ret, FI_SUCCESS, "FI_QUEUE_WORK failed %d", ret);
}

cr_assert((fi_control(&res.dom->fid, FI_FLUSH_WORK, NULL) == FI_SUCCESS));

Expand Down

0 comments on commit 2ad2e37

Please sign in to comment.