aboutsummaryrefslogtreecommitdiffstats
path: root/vpp-api-test/vat/api_format.c
diff options
context:
space:
mode:
Diffstat (limited to 'vpp-api-test/vat/api_format.c')
-rw-r--r--vpp-api-test/vat/api_format.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/vpp-api-test/vat/api_format.c b/vpp-api-test/vat/api_format.c
index d9325c4ffa2..6874c7de573 100644
--- a/vpp-api-test/vat/api_format.c
+++ b/vpp-api-test/vat/api_format.c
@@ -5829,6 +5829,9 @@ api_ip_add_del_route (vat_main_t * vam)
}
/* send it... */
S;
+ /* If we receive SIGTERM, stop now... */
+ if (vam->do_exit)
+ break;
}
/* When testing multiple add/del ops, use a control-ping to sync */
@@ -5861,6 +5864,10 @@ api_ip_add_del_route (vat_main_t * vam)
vam->async_errors = 0;
after = vat_time_now (vam);
+ /* slim chance, but we might have eaten SIGTERM on the first iteration */
+ if (j > 0)
+ count = j;
+
fformat (vam->ofp, "%d routes in %.6f secs, %.2f routes/sec\n",
count, after - before, count / (after - before));
}