Re: [Accel-config] [PATCH v1 2/2] accel-config: Fix batch event log core check output issues
"Zhu, Tony" <[email protected]> Tue, 25 Apr 2023 09:02:56 +0000
| Newsgroups | dev.linux.lists.accel-config |
|---|---|
| Message-ID | <BN9PR11MB54333F15FF3BAEAD05AEBD588A649@BN9PR11MB5433.namprd11.prod.outlook.com> |
Dave, Do you have comments about this change? Regards, Tony(zhu, xinzhan) -----Original Message----- From: Zhu, Tony <[email protected]>=20 Sent: Wednesday, April 19, 2023 3:24 PM To: [email protected]; Thomas, Ramesh <ramesh.thomas@i= ntel.com>; Yu, Fenghua <[email protected]> Cc: Zhu, Tony <[email protected]>; Zhang, Rex <[email protected]> Subject: [PATCH v1 2/2] accel-config: Fix batch event log core check output= issues When event log test core result and status are not expect, error messages a= re 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, in= t bof, int cpfault) bdi =3D &edl->bdi; printf("res 0x%x core_stat 0x%x nr_desc %d\n", res, core_stat, nr_desc); - if (res !=3D bdi->result) + if (res !=3D bdi->result) { err("core result (0x%x) expected (0x%x)\n", res, bdi->result); - if (core_stat !=3D bdi->status) + return ACCTEST_STATUS_FAIL; + } + if (core_stat !=3D bdi->status) { err("core status (0x%x) expected (0x%x)\n", core_stat, bdi->status); - if (res && bdi->desc_completed !=3D nr_desc) + return ACCTEST_STATUS_FAIL; + } + if (res && bdi->desc_completed !=3D 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 =3D=3D DSA_COMP_SUCCESS) { info("core task success, chekcing sub-tasks\n"); -- 2.27.0