Return error if Add/Delete fail in multiwriter perf test
Fixes: eff30b59cc2e ("test/lpm: add RCU performance tests")
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Dharmik Thakkar <[email protected]>
Reviewed-by: Ruifeng Wang <[email protected]>
---
app/test/test_lpm_perf.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/app/test/test_lpm_perf.c b/app/test/test_lpm_perf.c
index 45164b23214b..55084816ab91 100644
--- a/app/test/test_lpm_perf.c
+++ b/app/test/test_lpm_perf.c
@@ -453,6 +453,8 @@ test_lpm_rcu_qsbr_writer(void *arg)
next_hop_add) != 0) {
printf("Failed to add iteration %d, route#
%d\n",
i, j);
+ pthread_mutex_unlock(&lpm_mutex);
+ return -1;
}
pthread_mutex_unlock(&lpm_mutex);
}
@@ -464,6 +466,8 @@ test_lpm_rcu_qsbr_writer(void *arg)
large_ldepth_route_table[j].depth) != 0) {
printf("Failed to delete iteration %d, route#
%d\n",
i, j);
+ pthread_mutex_unlock(&lpm_mutex);
+ return -1;
}
pthread_mutex_unlock(&lpm_mutex);
}
--
2.17.1