[Accel-config] [PATCH v1 2/2] accel-config: Fix batch event log core check output issues
Tony Zhu <[email protected]> Wed, 19 Apr 2023 15:23:53 +0800
| Newsgroups | dev.linux.lists.accel-config |
|---|---|
| Message-ID | <[email protected]> |
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]> --- 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"); -- 2.27.0