Skip to contentSkip to conversation

app/crypto-perf: fix return status detection

PATCH Applied Tomasz Jozwiak 2 participants 2 messages Jun 14, 2019 – Jul 1, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 app/crypto-perf: fix return status detection

Currently, there's no return status check from lcore's jobs. In case of fail - crypto-perf tool returns success anyway. This patch adds such a detection and returns proper status at the end.

Fixes ce8af1a4398d ("app/crypto-perf: wait for cores launched by app")
---
 app/test-crypto-perf/main.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
app/test-crypto-perf/main.c +8 -2
index 4247f6a..ad72d7e 100644
@@ -664,9 +664,12 @@ main(int argc, char **argv)
 
 			if (i == total_nb_qps)
 				break;
-			rte_eal_wait_lcore(lcore_id);
+			ret |= rte_eal_wait_lcore(lcore_id);
 			i++;
 		}
+
+		if (ret != EXIT_SUCCESS)
+			goto err;
 	} else {
 
 		/* Get next size from range or list */
@@ -691,10 +694,13 @@ main(int argc, char **argv)
 
 				if (i == total_nb_qps)
 					break;
-				rte_eal_wait_lcore(lcore_id);
+				ret |= rte_eal_wait_lcore(lcore_id);
 				i++;
 			}
 
+			if (ret != EXIT_SUCCESS)
+				goto err;
+
 			/* Get next size from range or list */
 			if (opts.inc_buffer_size != 0)
 				opts.test_buffer_size += opts.inc_buffer_size;
Signature · 1 line
2.7.4