[asterisk-dev] [Code Review] 3198: testsuite: Don't continue if we cannot kill a (root?) running asterisk.

wdoekes reviewboard at asterisk.org
Fri Feb 7 08:39:57 CST 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3198/
-----------------------------------------------------------

Review request for Asterisk Developers.


Repository: testsuite


Description
-------

While testing a patch to the testsuite, I noticed this ugliness:

  rm: cannot remove ‘/var/run/asterisk/asterisk.ctl’: Permission denied
  rm: cannot remove ‘/var/run/asterisk/asterisk.pid’: Permission denied

Which is caused by:

  # XXX TODO Hard coded path, gross.
  os.system("rm -f /var/run/asterisk/asterisk.ctl")
  os.system("rm -f /var/run/asterisk/asterisk.pid")

The hardcoded path is ugly, but not problematic. The stale files cleanup is
just a friendly feature and not necessary.

The problem, however, was that I wasn't 'root', and some test cases are bound
to fail soon because there is still a running asterisk out there.

This patch fixes so the test suite dies if there is a running asterisk which
cannot be killed.


Diffs
-----

  /asterisk/trunk/runtests.py 4675 

Diff: https://reviewboard.asterisk.org/r/3198/diff/


Testing
-------

Yes. If there is an asterisk running that cannot be killed, the suite dies.


Thanks,

wdoekes

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140207/508ebfee/attachment.html>


More information about the asterisk-dev mailing list