[Accel-config] [PATCH v1 1/2] accel-config/test: fix batch result return logic error of sub-task fail

Tony Zhu <[email protected]> Wed, 19 Apr 2023 15:23:52 +0800
Newsgroups dev.linux.lists.accel-config
Message-ID <[email protected]>
It is not correct to return success when there is Sub-task failure. Even
there is one Sub-task failure, the return should be not success.

Signed-off-by: Tony Zhu <[email protected]>
---
 test/dsa.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/dsa.c b/test/dsa.c
index da5d2e6..e9cc55a 100644
--- a/test/dsa.c
+++ b/test/dsa.c
@@ -2257,9 +2257,9 @@ int batch_result_verify(struct batch_task *btsk, int bof, int cpfault)
 			}
 		} else {
 			err("Sub-task[%d] failed with stat=%d", i, sub_stat);
-			return ACCTEST_STATUS_FAIL;
+			rc = ACCTEST_STATUS_FAIL;
 		}
 	}
 
-	return ACCTEST_STATUS_OK;
+	return rc;
 }
-- 
2.27.0