[Asterisk-code-review] Add support for delayed shutdown of Asterisk when checking f... (testsuite[master])

Corey Farrell asteriskteam at digium.com
Mon Oct 30 11:33:17 CDT 2017


Hello Kevin Harwell, Jenkins2, George Joseph, 

I'd like you to reexamine a change. Please visit

    https://gerrit.asterisk.org/6845

to look at the new patch set (#4).

Change subject: Add support for delayed shutdown of Asterisk when checking for leaks.
......................................................................

Add support for delayed shutdown of Asterisk when checking for leaks.

Add memcheck-delay-stop option to test-config.yaml in the test-object
config section.  This causes a pause during shutdown if Asterisk is run
under valgrind or has REF_DEBUG enabled.  This delay is not meant to
compensate for slowness caused by memory debugging, but to allow SIP
timers to clean resources before shutdown of Asterisk is initiated.

If set this options forces reactor-timeout to be at least 3 seconds
longer.  This is only done to stop the testsuite from printing a reactor
timeout warning for tests with a large memcheck-delay-stop value.

I had considered setting a non-zero default for memcheck-delay-stop but
the majority of tests do not require any delay.  Since the testsuite
contains nearly 1000 tests using a 7 second default delay would add
nearly 2 hours to the total runtime.  I estimate that only 20% of the
tests require any delay.  The amount of delay needed varies based on
which timers we need to wait for: timer_b, session expiration, defered
session termination.  The minimums for these timers range from 6.4 - 90
seconds.  In most cases using the minimum delay will require modification
of the test.  For example reconfiguring timer_t1 and timer_b in some basic
PJSIP call tests or reducing the 'Expires:' header in SIP SUBSCRIBE tests.

As an example of usage tests/channels/pjsip/accountcode has been
updated.  The timer_t1 and timer_b have been decreased to minimize the
delay needed.

ASTERISK-27306

Change-Id: I67ec89e4a116526ad34796a233e15fec794cf3e1
---
M lib/python/asterisk/apptest.py
M lib/python/asterisk/ari.py
M lib/python/asterisk/asterisk.py
M lib/python/asterisk/sipp.py
M lib/python/asterisk/test_case.py
M tests/channels/pjsip/accountcode/configs/ast1/pjsip.conf
M tests/channels/pjsip/accountcode/test-config.yaml
7 files changed, 48 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/45/6845/4
-- 
To view, visit https://gerrit.asterisk.org/6845
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I67ec89e4a116526ad34796a233e15fec794cf3e1
Gerrit-Change-Number: 6845
Gerrit-PatchSet: 4
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171030/351f54fb/attachment-0001.html>


More information about the asterisk-code-review mailing list