<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://reviewboard.asterisk.org/r/1604/">https://reviewboard.asterisk.org/r/1604/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Asterisk Developers.</div>
<div>By wdoekes.</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">The test suite can throw off new users by being a bit verbose with errors/warnings that are not really problems:
- EXDEV error when hardlinking causes "OSError occurred while copying ..." <-- wrong, should be "while hardlinking"
- if a destination file exists (backtrace.txt doesn't get its own astN-dir in the logs) you get a warning/failure
Further, there were a couple of minor eye sores:
- very verbose exception handling which extracts values for printing purposes only: use str(exception) instead
- shell=True in subprocess call to gdb
- no redirect of stderr in call to gdb
- missing LF in self.stdout addition
This patch addresses this so I can get back to the task at hand, which was to create a test.
(Note that I didn't add exception handlers around the makedirs() and open() in __archive_core_dump. If you're not able to create directories and log files, you probably shouldn't be running any tests at all. And, backtrace.txt in logs is now always overwritten, even if extracting a core dump were to fail. I don't see this as a problem.)</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">--- before.txt        2011-11-30 22:55:28.084665732 +0100
+++ after.txt        2011-11-30 22:56:10.776877432 +0100
@@ -9,24 +9,14 @@
Parsing /tmp/asterisk-testsuite/channels/SIP/sip_reg_domain_acl/ast8/etc/asterisk/logger.general.conf.inc
Parsing /tmp/asterisk-testsuite/channels/SIP/sip_reg_domain_acl/ast8/etc/asterisk/logger.logfiles.conf.inc
[Nov 30 22:55:10] WARNING[9310]: asterisk.TestCase:217 __reactor_timeout: Reactor timeout: '3' seconds
-OSError occurred while copying /tmp/asterisk-testsuite/channels/SIP/sip_reg_domain_acl/ast8/var/log/asterisk ([18]: Invalid cross-device link)
-Attempting copy
Core dump detected; an Asterisk instance must have crashed
-Running gdb -se "asterisk" -ex "bt full" -ex "thread apply all bt" --batch -c core > ./backtrace.txt
-
-warning: Can't read pathname for load map: Input/output error.
-
-warning: Could not load shared library symbols for 190 libraries, e.g. /tmp/asterisk-testsuite/fastagi/control-stream-file/ast1/usr/lib/asterisk/modules/pbx_lua.so.
-Use the "info sharedlibrary" command to see the complete listing.
-Do you need "set solib-search-path" or "set sysroot"?
-OSError occurred while copying backtrace.txt ([17]: File exists)
-Attempting copy
-Exception occurred while archiving backtrace from ` to .: /
+Running gdb -se asterisk -ex bt full -ex thread apply all bt --batch -c core
<?xml version="1.0" encoding="utf-8"?>
-<testsuite errors="0" failures="1" name="AsteriskTestSuite" tests="1" time="11.17">
- <testcase name="tests/channels/SIP/sip_reg_domain_acl" time="11.17">
+<testsuite errors="0" failures="1" name="AsteriskTestSuite" tests="1" time="11.20">
+ <testcase name="tests/channels/SIP/sip_reg_domain_acl" time="11.20">
<failure>
- Running ['tests/channels/SIP/sip_reg_domain_acl/run-test'] ...Parsing /tmp/asterisk-testsuite/channels/SIP/sip_reg_domain_acl/ast8/etc/asterisk/extconfig.conf
+ Running ['tests/channels/SIP/sip_reg_domain_acl/run-test'] ...
+Parsing /tmp/asterisk-testsuite/channels/SIP/sip_reg_domain_acl/ast8/etc/asterisk/extconfig.conf
Parsing /tmp/asterisk-testsuite/channels/SIP/sip_reg_domain_acl/ast8/etc/asterisk/logger.conf
Parsing /tmp/asterisk-testsuite/channels/SIP/sip_reg_domain_acl/ast8/etc/asterisk/logger.general.conf.inc
Parsing /tmp/asterisk-testsuite/channels/SIP/sip_reg_domain_acl/ast8/etc/asterisk/logger.logfiles.conf.inc
</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>/asterisk/trunk/cleanup-test-remnants.sh <span style="color: grey">(2817)</span></li>
<li>/asterisk/trunk/runtests.py <span style="color: grey">(2817)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/1604/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>