aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2019-05-06 10:49:41 -0400
committerPaul Vinciguerra <pvinci@vinciconsulting.com>2019-05-06 20:48:51 +0000
commitad64687e8bc3e208797ce1d5b16936f51d6cf632 (patch)
tree14f15c2f326bda0bbc4d05c2f73bae9f5c71c0c0 /test
parentd7566cb70bbd1917e25e47c08a26c72451d86794 (diff)
gcov / test framework: sigterm not sigkill
Otherwise, gcov data vanishes without a trace. Add a __gcov_flush() call to the unix signal handler, under #ifdef CLIB_GCOV. Add -DCLIB_GCOV to vpp_gcov_TAG_CFLAGS. Change-Id: I2726e671b26dfbe7fae88f46a8207bb2b5106884 Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'test')
-rw-r--r--test/framework.py2
-rw-r--r--test/test_vcl.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/test/framework.py b/test/framework.py
index 25db2b72b34..4ce8bc1380d 100644
--- a/test/framework.py
+++ b/test/framework.py
@@ -530,7 +530,7 @@ class VppTestCase(unittest.TestCase):
cls.vpp.poll()
if cls.vpp.returncode is None:
cls.logger.debug("Sending TERM to vpp")
- cls.vpp.kill()
+ cls.vpp.terminate()
cls.logger.debug("Waiting for vpp to die")
cls.vpp.communicate()
cls.logger.debug("Deleting class vpp attribute on %s",
diff --git a/test/test_vcl.py b/test/test_vcl.py
index feb4e39120c..269a96107b2 100644
--- a/test/test_vcl.py
+++ b/test/test_vcl.py
@@ -202,7 +202,7 @@ class VCLTestCase(VppTestCase):
if os.path.isdir('/proc/{}'.format(worker_server.process.pid)):
self.logger.info("Killing server worker process (pid %d)" %
worker_server.process.pid)
- os.killpg(os.getpgid(worker_server.process.pid), signal.SIGKILL)
+ os.killpg(os.getpgid(worker_server.process.pid), signal.SIGTERM)
worker_server.join()
self.logger.info("Client worker result is `%s'" % worker_client.result)
error = False