summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Vinciguerra <pvinci@vinciconsulting.com>2019-10-27 14:08:09 -0400
committerDave Wallace <dwallacelf@gmail.com>2019-10-30 19:57:33 +0000
commit4465fe1e30556b40c9ef8a1a155aa1665102dd22 (patch)
tree7acac36979e63ac2b8a441407297d8a710ad497c
parent5b755e2f9fce239b5280ac1e5e21f835464fa017 (diff)
tests: add sending SIGQUIT to vpp quit sequence
As suggested in the docs by: https://fd.io/docs/vpp/master/usecases/contiv/core_files#let-vpp-crash Type: test Change-Id: I10caf16220e2507351636c1b26e57e19bcf8a542 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
-rw-r--r--test/framework.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/test/framework.py b/test/framework.py
index e3c605b64ac..7275d2c7c7d 100644
--- a/test/framework.py
+++ b/test/framework.py
@@ -474,12 +474,13 @@ class VppTestCase(unittest.TestCase):
cls.logger.critical("Couldn't stat : {}".format(cls.stats_sock))
@classmethod
- def wait_for_coredump(cls):
- corefile = cls.tempdir + "/core"
+ def wait_for_coredump(cls, corefile, wait_time=60):
+ cls.vpp.send_signal(signal.SIGQUIT)
if os.path.isfile(corefile):
- cls.logger.error("Waiting for coredump to complete: %s", corefile)
+ cls.logger.error("Waiting %s sec. for coredump to complete: %s",
+ (wait_time, corefile))
curr_size = os.path.getsize(corefile)
- deadline = time.time() + 60
+ deadline = time.time() + wait_time
ok = False
while time.time() < deadline:
cls.sleep(1)
@@ -610,7 +611,7 @@ class VppTestCase(unittest.TestCase):
cls.logger.debug("Waiting for pump thread to stop")
cls.pump_thread.join()
if hasattr(cls, 'vpp_stderr_reader_thread'):
- cls.logger.debug("Waiting for stdderr pump to stop")
+ cls.logger.debug("Waiting for stderr pump to stop")
cls.vpp_stderr_reader_thread.join()
if hasattr(cls, 'vpp'):
@@ -623,7 +624,7 @@ class VppTestCase(unittest.TestCase):
del cls.vapi
cls.vpp.poll()
if cls.vpp.returncode is None:
- cls.wait_for_coredump()
+ cls.wait_for_coredump(cls.tempdir + "/core", wait_time=60)
cls.logger.debug("Sending TERM to vpp")
cls.vpp.terminate()
cls.logger.debug("Waiting for vpp to die")