[Asterisk-code-review] tests/channels/SIP/rfc2833 dtmf detect: Requires rawsocket. (testsuite[13])

Corey Farrell asteriskteam at digium.com
Thu Jun 21 10:01:04 CDT 2018


Corey Farrell has posted comments on this change. ( https://gerrit.asterisk.org/9233 )

Change subject: tests/channels/SIP/rfc2833_dtmf_detect: Requires rawsocket.
......................................................................


Patch Set 1:

> >
 > > rawsocket typically requires root, it's not really a dependency
 > > that can be missing.  The 'dependency' actually just verifies
 > that
 > > `socket.socket(socket.AF_PACKET, socket.SOCK_RAW)` passes.  See
 > > lib/python/asterisk/test_config.py Dependency.depend_rawsocket
 > for
 > > the test code.
 > 
 > I guess then it's an information problem. By adding the custom
 > dependency and not running as root the test just spits out
 > "Dependency: rawsocket - False". Without this patch you get a much
 > more informative error: "Can't create raw IPv4 socket (need to run
 > as root?)"
 > 
 > Perhaps a print or log statement saying why the dependency failed
 > would make sense?

I don't think the dependency checking process can produce custom messages like that.  The main point is that this patch causes the test to be skipped instead of failing, working towards making it possible to run the testsuite without root and get 0% failure.


-- 
To view, visit https://gerrit.asterisk.org/9233
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: testsuite
Gerrit-Branch: 13
Gerrit-MessageType: comment
Gerrit-Change-Id: I9d4307d8e54f36e9c59dfc5096accea321cff7d6
Gerrit-Change-Number: 9233
Gerrit-PatchSet: 1
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Comment-Date: Thu, 21 Jun 2018 15:01:04 +0000
Gerrit-HasComments: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180621/6f5da0d7/attachment.html>


More information about the asterisk-code-review mailing list