vpp/vpp-api-test/Makefile.am
Dave Barach 2b836cf4d1 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>
2016-04-22 09:54:33 -04:00

38 lines
1.3 KiB
Makefile

# Copyright (c) 2015 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
AUTOMAKE_OPTIONS = foreign subdir-objects
AM_CFLAGS = -Wall @Q_PLATFORM_DEFINE@ @Q_PLATFORM_PLUGPATH@ @DPDK@
libvatplugin_la_SOURCES = \
vat/plugin_api.c
lib_LTLIBRARIES = libvatplugin.la
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
vpp_api_test_LDADD = -lvlibmemoryclient -lvlibapi -lsvm \
-lvppinfra -lpthread -lm \
-lrt -ldl libvatplugin.la
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