[Home]

Summary:ASTERISK-25225: testsuite: lua tests using SIPp cannot run on Jenkins
Reporter:Matt Jordan (mjordan)Labels:
Date Opened:2015-07-01 13:57:00Date Closed:
Priority:MajorRegression?
Status:Open/NewComponents:Tests/testsuite
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Running any one of the following four tests fails on the Jenkins build agents:
# SIP/rfc2833_dtmf_detect
# SIP/sip_channel_params
# SIP/tcpauthlimit
# SIP/tcpauthtimeout

This is because Jenkins build agents are not a big fan of processes trying to open a terminal:

{noformat}
     Running ['tests/channels/SIP/rfc2833_dtmf_detect/run-test'] ...
error while executing sipp/register.xml sipp scenario (sipp exited with status 1)

Error opening terminal: unknown.



error running test
{noformat}

The Python tests work around this by spawning a process inside a virtual terminal:

{code}
       reactor.spawnProcess(self._process,
                            sipp_args[0],
                            sipp_args,
                            {"TERM": "vt100", },
                            None,
                            None)
{code}

Hence, porting those tests from lua to Python would magifix the problem.
Comments:By: Asterisk Team (asteriskteam) 2015-07-01 13:57:01.283-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Walter Doekes (wdoekes) 2015-07-02 04:43:06.457-0500

Alternate fixes:

Supply a TERM value when starting asttest in all 4 tests.

Example:
{noformat}
--- tests/channels/SIP/rfc2833_dtmf_detect/run-test (revision 5649)
+++ tests/channels/SIP/rfc2833_dtmf_detect/run-test (working copy)
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
set -e

-asttest -a /$AST_TEST_ROOT -s tests/channels/SIP/rfc2833_dtmf_detect
+TERM=dumb asttest -a /$AST_TEST_ROOT -s tests/channels/SIP/rfc2833_dtmf_detect

{noformat}

Or using SIPp which supports running without a terminal.
https://github.com/SIPp/sipp/commit/c2381c87f41e5727904f79143935e71ebf117e91