<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 &quot;OSError occurred while copying ...&quot; &lt;-- wrong, should be &quot;while hardlinking&quot;
- if a destination file exists (backtrace.txt doesn&#39;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&#39;t add exception handlers around the makedirs() and open() in __archive_core_dump. If you&#39;re not able to create directories and log files, you probably shouldn&#39;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&#39;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: &#39;3&#39; 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 &quot;asterisk&quot; -ex &quot;bt full&quot; -ex &quot;thread apply all bt&quot; --batch -c core &gt; ./backtrace.txt
-
-warning: Can&#39;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 &quot;info sharedlibrary&quot; command to see the complete listing.
-Do you need &quot;set solib-search-path&quot; or &quot;set sysroot&quot;?
-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
 &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
-&lt;testsuite errors=&quot;0&quot; failures=&quot;1&quot; name=&quot;AsteriskTestSuite&quot; tests=&quot;1&quot; time=&quot;11.17&quot;&gt;
-  &lt;testcase name=&quot;tests/channels/SIP/sip_reg_domain_acl&quot; time=&quot;11.17&quot;&gt;
+&lt;testsuite errors=&quot;0&quot; failures=&quot;1&quot; name=&quot;AsteriskTestSuite&quot; tests=&quot;1&quot; time=&quot;11.20&quot;&gt;
+  &lt;testcase name=&quot;tests/channels/SIP/sip_reg_domain_acl&quot; time=&quot;11.20&quot;&gt;
     &lt;failure&gt;
-      Running [&#39;tests/channels/SIP/sip_reg_domain_acl/run-test&#39;] ...Parsing /tmp/asterisk-testsuite/channels/SIP/sip_reg_domain_acl/ast8/etc/asterisk/extconfig.conf
+      Running [&#39;tests/channels/SIP/sip_reg_domain_acl/run-test&#39;] ...
+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>