aboutsummaryrefslogtreecommitdiffstats
path: root/vpp-api-test/Makefile.am
diff options
context:
space:
mode:
authorDave Barach <dbarach@cisco.com>2016-04-22 09:54:22 -0400
committerDave Barach <dbarach@cisco.com>2016-04-22 09:54:33 -0400
commit2b836cf4d1e4e59ca34229a9fdf49d79216da20e (patch)
treead9e5acabd3702c33a4247fce2adbcbd4a390859 /vpp-api-test/Makefile.am
parentdaede645441e72cdca631cef7b687e74183cc146 (diff)
Add a vpp_restart command
vpp_restart solves the problem of restarting vpp and not exiting until the new vpp instance is sufficiently established to allow immediate binary API connections. The point is to avoid using arbitrary "sleep N" commands e.g. in CSIT shell scripts. We send SIGTERM to the current vpp process, and expect / depend on the process-monitor du jour to remove the vpp-api shared-memory segment. vpp_restart exits w/ status 0 if all is well, non-zero upon failure. In trying to make vpp_restart reliable, we discovered a recently-introduced heap corruption bug in .../dpdk/init.c, which caused vpp to crash on startup once every 20 times on a particular rig. If possible, we should check /var/log/syslog for evidence of unexpected multiple restarts during regression-testing. Change-Id: Ic48c74b1a94a4368066ba2e326d4b12d51192088 Signed-off-by: Dave Barach <dbarach@cisco.com>
Diffstat (limited to 'vpp-api-test/Makefile.am')
-rw-r--r--vpp-api-test/Makefile.am4
1 files changed, 3 insertions, 1 deletions
diff --git a/vpp-api-test/Makefile.am b/vpp-api-test/Makefile.am
index 5079f8d49b9..d59c7e27f5c 100644
--- a/vpp-api-test/Makefile.am
+++ b/vpp-api-test/Makefile.am
@@ -20,7 +20,7 @@ libvatplugin_la_SOURCES = \
lib_LTLIBRARIES = libvatplugin.la
-bin_PROGRAMS = vpp_api_test vpp_json_test
+bin_PROGRAMS = vpp_api_test vpp_json_test vpp_restart
vpp_api_test_SOURCES = vat/api_format.c vat/main.c vat/plugin.c vat/vat.h vat/json_format.h vat/json_format.c
vpp_json_test_SOURCES = vat/json_format.h vat/json_format.c vat/json_test.c
@@ -31,5 +31,7 @@ vpp_api_test_LDADD = -lvlibmemoryclient -lvlibapi -lsvm \
vpp_json_test_LDADD = -lvppinfra -lm
nobase_include_HEADERS = vat/vat.h vat/json_format.h
+vpp_restart_SOURCES = vat/restart.c
+vpp_restart_LDADD = -lsvmdb -lsvm -lvppinfra -lpthread -lrt
dist_bin_SCRIPTS = scripts/vppctl