Re: [Accel-config] [PATCH v1 2/2] accel-config: Fix batch event log core check output issues
Dave Jiang <[email protected]> Tue, 25 Apr 2023 08:14:05 -0700
| Newsgroups | dev.linux.lists.accel-config |
|---|---|
| Message-ID | <[email protected]> |
On 4/19/23 12:23 AM, Tony Zhu wrote: > When event log test core result and status are not expect, error > messages are ouput. But the return is still success. The expect behavior > is to return the failure after the error message. > > Signed-off-by: Tony Zhu <[email protected]> Reviewed-by: Dave Jiang <[email protected]> > --- > test/dsa.c | 12 +++++++++--- > 1 file changed, 9 insertions(+), 3 deletions(-) > > diff --git a/test/dsa.c b/test/dsa.c > index e9cc55a..38ff358 100644 > --- a/test/dsa.c > +++ b/test/dsa.c > @@ -2199,15 +2199,21 @@ int batch_result_verify(struct batch_task *btsk, int bof, int cpfault) > bdi = &edl->bdi; > printf("res 0x%x core_stat 0x%x nr_desc %d\n", > res, core_stat, nr_desc); > - if (res != bdi->result) > + if (res != bdi->result) { > err("core result (0x%x) expected (0x%x)\n", > res, bdi->result); > - if (core_stat != bdi->status) > + return ACCTEST_STATUS_FAIL; > + } > + if (core_stat != bdi->status) { > err("core status (0x%x) expected (0x%x)\n", > core_stat, bdi->status); > - if (res && bdi->desc_completed != nr_desc) > + return ACCTEST_STATUS_FAIL; > + } > + if (res && bdi->desc_completed != nr_desc) { > err("core descs completed (0x%x) expected (0x%x)\n", > nr_desc, bdi->desc_completed); > + return ACCTEST_STATUS_FAIL; > + } > } else { > if (core_stat == DSA_COMP_SUCCESS) { > info("core task success, chekcing sub-tasks\n");