Re: [asterisk-dev] [Code Review] 3027: Valgrind support in TestSuite

2014-04-29 Thread Scott Griepentrog

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

(Updated April 29, 2014, 1:28 p.m.)


Status
--

This change has been discarded.


Review request for Asterisk Developers.


Repository: testsuite


Description
---

This patch adds support for running Asterisk under Valgrind (say: Val-Grinned) 
to check for all sorts of nasty runtime bugs.  This started off with a post to 
asterisk-dev list by nitesh.ban...@gmail.com, and he wrote and contributed the 
initial version.  So if you find this useful, be sure to thank him.  Then I 
made extensive changes and additions, so if the code stinks, blame me.

The following has been done:

- Check runtests.py arguments for --valgrind and --valgrind-gensupp flags, pass 
via environ to TestCase.py
- Note previously existing instances of ast# logs to insure we only process new 
log/xml files
- Increase reactor timeout by x5 when valgrind enabled
- Patch to reactor_stop() to insure it does even when exceptions occur in 
deferred stack
- Add valgrind with correct arguments into executable path
- After run, check valgrind.xml for errors, parse and condense them into 
something more managable
- If -gensup mode enabled, write suppressions to logs/(test)/ast#/valgrind.supp 
that can be added (manually)
- A default valgrind.supp suppressions file is in configs/ to prevent 
complaints about known unfixables

Notes:

- valgrind can be triggered by argument to runtests.py, export VALGRIND=true, 
or in test-config.yaml
- configs/valgrind.supp will be used if found, but 
tests/(test)/configs/valgrind.supp will take precedence
- valgrind-gensupp mode will create example suppressions file, during which no 
suppressions occur


Diffs
-

  /asterisk/trunk/runtests.py 4350 
  /asterisk/trunk/lib/python/asterisk/asterisk.py 4350 
  /asterisk/trunk/lib/python/asterisk/Valgrind.py PRE-CREATION 
  /asterisk/trunk/lib/python/asterisk/TestConfig.py 4350 
  /asterisk/trunk/lib/python/asterisk/TestCase.py 4350 
  /asterisk/trunk/configs/valgrind.supp PRE-CREATION 
  /asterisk/trunk/README.txt 4350 

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


Testing
---

Tested on 64bit and 32bit CentOS, including low cpu power conditions.  Some 
sporadic timing issues affecting AMI/twisted operation have been seen and will 
be corrected.


Thanks,

Scott Griepentrog

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Re: [asterisk-dev] [Code Review] 3027: Valgrind support in TestSuite

2013-12-12 Thread opticron

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



/asterisk/trunk/README.txt
https://reviewboard.asterisk.org/r/3027/#comment19812

The indentation in this document should use spaces instead of tabs.



/asterisk/trunk/README.txt
https://reviewboard.asterisk.org/r/3027/#comment19811

Idem. There is quite a lot of incorrect indentation in this file.



/asterisk/trunk/README.txt
https://reviewboard.asterisk.org/r/3027/#comment19813

Red blob.



/asterisk/trunk/configs/valgrind.supp
https://reviewboard.asterisk.org/r/3027/#comment19816

Red blobs.



/asterisk/trunk/runtests.py
https://reviewboard.asterisk.org/r/3027/#comment19814

It would be a bit cleaner to use the glob module to get a list of matching 
paths and then get the length of the list.


- opticron


On Dec. 10, 2013, 11:51 a.m., Scott Griepentrog wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviewboard.asterisk.org/r/3027/
 ---
 
 (Updated Dec. 10, 2013, 11:51 a.m.)
 
 
 Review request for Asterisk Developers.
 
 
 Repository: testsuite
 
 
 Description
 ---
 
 This patch adds support for running Asterisk under Valgrind (say: 
 Val-Grinned) to check for all sorts of nasty runtime bugs.  This started off 
 with a post to asterisk-dev list by nitesh.ban...@gmail.com, and he wrote and 
 contributed the initial version.  So if you find this useful, be sure to 
 thank him.  Then I made extensive changes and additions, so if the code 
 stinks, blame me.
 
 The following has been done:
 
 - Check runtests.py arguments for --valgrind and --valgrind-gensupp flags, 
 pass via environ to TestCase.py
 - Note previously existing instances of ast# logs to insure we only process 
 new log/xml files
 - Increase reactor timeout by x5 when valgrind enabled
 - Patch to reactor_stop() to insure it does even when exceptions occur in 
 deferred stack
 - Add valgrind with correct arguments into executable path
 - After run, check valgrind.xml for errors, parse and condense them into 
 something more managable
 - If -gensup mode enabled, write suppressions to 
 logs/(test)/ast#/valgrind.supp that can be added (manually)
 - A default valgrind.supp suppressions file is in configs/ to prevent 
 complaints about known unfixables
 
 Notes:
 
 - valgrind can be triggered by argument to runtests.py, export VALGRIND=true, 
 or in test-config.yaml
 - configs/valgrind.supp will be used if found, but 
 tests/(test)/configs/valgrind.supp will take precedence
 - valgrind-gensupp mode will create example suppressions file, during which 
 no suppressions occur
 
 
 Diffs
 -
 
   /asterisk/trunk/runtests.py 4350 
   /asterisk/trunk/lib/python/asterisk/asterisk.py 4350 
   /asterisk/trunk/lib/python/asterisk/Valgrind.py PRE-CREATION 
   /asterisk/trunk/lib/python/asterisk/TestConfig.py 4350 
   /asterisk/trunk/lib/python/asterisk/TestCase.py 4350 
   /asterisk/trunk/configs/valgrind.supp PRE-CREATION 
   /asterisk/trunk/README.txt 4350 
 
 Diff: https://reviewboard.asterisk.org/r/3027/diff/
 
 
 Testing
 ---
 
 Tested on 64bit and 32bit CentOS, including low cpu power conditions.  Some 
 sporadic timing issues affecting AMI/twisted operation have been seen and 
 will be corrected.
 
 
 Thanks,
 
 Scott Griepentrog
 


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Re: [asterisk-dev] [Code Review] 3027: Valgrind support in TestSuite

2013-12-12 Thread Scott Griepentrog


 On Dec. 12, 2013, 12:56 p.m., opticron wrote:
  /asterisk/trunk/runtests.py, lines 69-73
  https://reviewboard.asterisk.org/r/3027/diff/3/?file=49321#file49321line69
 
  It would be a bit cleaner to use the glob module to get a list of 
  matching paths and then get the length of the list.

While that's correct, it wouldn't then match the later algorithm searching for 
new directories- i.e. it would be possible although unlikely to have 
directories ast1  ast9 resulting in instances=2 rather than 1.  This bit of 
code was added to prevent re-copying (or in case of valgrind's xml files 
reparsing) the ast# directories from previous tests.  I think it's better 
although ugly to leave this bit of code to match __archive_ast_logs(), although 
I am now reducing it to just:

while os.path.isdir(%s/ast%d % (ast_directories, 
self.existing_ast_instances+1)):
self.existing_ast_instances += 1


- Scott


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


On Dec. 10, 2013, 11:51 a.m., Scott Griepentrog wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviewboard.asterisk.org/r/3027/
 ---
 
 (Updated Dec. 10, 2013, 11:51 a.m.)
 
 
 Review request for Asterisk Developers.
 
 
 Repository: testsuite
 
 
 Description
 ---
 
 This patch adds support for running Asterisk under Valgrind (say: 
 Val-Grinned) to check for all sorts of nasty runtime bugs.  This started off 
 with a post to asterisk-dev list by nitesh.ban...@gmail.com, and he wrote and 
 contributed the initial version.  So if you find this useful, be sure to 
 thank him.  Then I made extensive changes and additions, so if the code 
 stinks, blame me.
 
 The following has been done:
 
 - Check runtests.py arguments for --valgrind and --valgrind-gensupp flags, 
 pass via environ to TestCase.py
 - Note previously existing instances of ast# logs to insure we only process 
 new log/xml files
 - Increase reactor timeout by x5 when valgrind enabled
 - Patch to reactor_stop() to insure it does even when exceptions occur in 
 deferred stack
 - Add valgrind with correct arguments into executable path
 - After run, check valgrind.xml for errors, parse and condense them into 
 something more managable
 - If -gensup mode enabled, write suppressions to 
 logs/(test)/ast#/valgrind.supp that can be added (manually)
 - A default valgrind.supp suppressions file is in configs/ to prevent 
 complaints about known unfixables
 
 Notes:
 
 - valgrind can be triggered by argument to runtests.py, export VALGRIND=true, 
 or in test-config.yaml
 - configs/valgrind.supp will be used if found, but 
 tests/(test)/configs/valgrind.supp will take precedence
 - valgrind-gensupp mode will create example suppressions file, during which 
 no suppressions occur
 
 
 Diffs
 -
 
   /asterisk/trunk/runtests.py 4350 
   /asterisk/trunk/lib/python/asterisk/asterisk.py 4350 
   /asterisk/trunk/lib/python/asterisk/Valgrind.py PRE-CREATION 
   /asterisk/trunk/lib/python/asterisk/TestConfig.py 4350 
   /asterisk/trunk/lib/python/asterisk/TestCase.py 4350 
   /asterisk/trunk/configs/valgrind.supp PRE-CREATION 
   /asterisk/trunk/README.txt 4350 
 
 Diff: https://reviewboard.asterisk.org/r/3027/diff/
 
 
 Testing
 ---
 
 Tested on 64bit and 32bit CentOS, including low cpu power conditions.  Some 
 sporadic timing issues affecting AMI/twisted operation have been seen and 
 will be corrected.
 
 
 Thanks,
 
 Scott Griepentrog
 


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Re: [asterisk-dev] [Code Review] 3027: Valgrind support in TestSuite

2013-12-10 Thread Scott Griepentrog

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

(Updated Dec. 10, 2013, 11:51 a.m.)


Review request for Asterisk Developers.


Changes
---

Updated to include changes from feedback and some additional features used in 
support of r3056

- majority of changes relocated to Valgrind.py module
- can disable leak and unref checks
- can run with gdb for additional debug at point of bad ptr
- general pythonicization improvements


Repository: testsuite


Description
---

This patch adds support for running Asterisk under Valgrind (say: Val-Grinned) 
to check for all sorts of nasty runtime bugs.  This started off with a post to 
asterisk-dev list by nitesh.ban...@gmail.com, and he wrote and contributed the 
initial version.  So if you find this useful, be sure to thank him.  Then I 
made extensive changes and additions, so if the code stinks, blame me.

The following has been done:

- Check runtests.py arguments for --valgrind and --valgrind-gensupp flags, pass 
via environ to TestCase.py
- Note previously existing instances of ast# logs to insure we only process new 
log/xml files
- Increase reactor timeout by x5 when valgrind enabled
- Patch to reactor_stop() to insure it does even when exceptions occur in 
deferred stack
- Add valgrind with correct arguments into executable path
- After run, check valgrind.xml for errors, parse and condense them into 
something more managable
- If -gensup mode enabled, write suppressions to logs/(test)/ast#/valgrind.supp 
that can be added (manually)
- A default valgrind.supp suppressions file is in configs/ to prevent 
complaints about known unfixables

Notes:

- valgrind can be triggered by argument to runtests.py, export VALGRIND=true, 
or in test-config.yaml
- configs/valgrind.supp will be used if found, but 
tests/(test)/configs/valgrind.supp will take precedence
- valgrind-gensupp mode will create example suppressions file, during which no 
suppressions occur


Diffs (updated)
-

  /asterisk/trunk/runtests.py 4350 
  /asterisk/trunk/lib/python/asterisk/asterisk.py 4350 
  /asterisk/trunk/lib/python/asterisk/Valgrind.py PRE-CREATION 
  /asterisk/trunk/lib/python/asterisk/TestConfig.py 4350 
  /asterisk/trunk/lib/python/asterisk/TestCase.py 4350 
  /asterisk/trunk/configs/valgrind.supp PRE-CREATION 
  /asterisk/trunk/README.txt 4350 

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


Testing
---

Tested on 64bit and 32bit CentOS, including low cpu power conditions.  Some 
sporadic timing issues affecting AMI/twisted operation have been seen and will 
be corrected.


Thanks,

Scott Griepentrog

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Re: [asterisk-dev] [Code Review] 3027: Valgrind support in TestSuite

2013-12-10 Thread Scott Griepentrog


 On Nov. 27, 2013, 11:37 a.m., Matt Jordan wrote:
  /asterisk/team/sgriepentrog/testsuite-valgrind/runtests.py, lines 84-93
  https://reviewboard.asterisk.org/r/3027/diff/2/?file=48827#file48827line84
 
  It's very strange for us to call __parse_run_output twice here. We 
  should only need to call it once - ideally, we would have the valgrind 
  output that we want to display on stdout already ready for it.

The purpose was to reassign self.output to self.failure_message after 
parse_valgrind_xml() had added to it (self.output).  This has been reworked.


 On Nov. 27, 2013, 11:37 a.m., Matt Jordan wrote:
  /asterisk/team/sgriepentrog/testsuite-valgrind/runtests.py, lines 297-298
  https://reviewboard.asterisk.org/r/3027/diff/2/?file=48827#file48827line297
 
  Don't direct the output of errors to both stdout and print them 
  directly. In general, we shouldn't call print - that overrides the user's 
  choices in terms of logging and what is displayed.

When manually running a large group of tests, stdout is delayed until all tests 
complete, whereas print is shown immediately.  There are times when this output 
is comforting to observe progress on the test, but I'll reduce it to a total # 
of errors and exceptions.


- Scott


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


On Dec. 10, 2013, 11:51 a.m., Scott Griepentrog wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviewboard.asterisk.org/r/3027/
 ---
 
 (Updated Dec. 10, 2013, 11:51 a.m.)
 
 
 Review request for Asterisk Developers.
 
 
 Repository: testsuite
 
 
 Description
 ---
 
 This patch adds support for running Asterisk under Valgrind (say: 
 Val-Grinned) to check for all sorts of nasty runtime bugs.  This started off 
 with a post to asterisk-dev list by nitesh.ban...@gmail.com, and he wrote and 
 contributed the initial version.  So if you find this useful, be sure to 
 thank him.  Then I made extensive changes and additions, so if the code 
 stinks, blame me.
 
 The following has been done:
 
 - Check runtests.py arguments for --valgrind and --valgrind-gensupp flags, 
 pass via environ to TestCase.py
 - Note previously existing instances of ast# logs to insure we only process 
 new log/xml files
 - Increase reactor timeout by x5 when valgrind enabled
 - Patch to reactor_stop() to insure it does even when exceptions occur in 
 deferred stack
 - Add valgrind with correct arguments into executable path
 - After run, check valgrind.xml for errors, parse and condense them into 
 something more managable
 - If -gensup mode enabled, write suppressions to 
 logs/(test)/ast#/valgrind.supp that can be added (manually)
 - A default valgrind.supp suppressions file is in configs/ to prevent 
 complaints about known unfixables
 
 Notes:
 
 - valgrind can be triggered by argument to runtests.py, export VALGRIND=true, 
 or in test-config.yaml
 - configs/valgrind.supp will be used if found, but 
 tests/(test)/configs/valgrind.supp will take precedence
 - valgrind-gensupp mode will create example suppressions file, during which 
 no suppressions occur
 
 
 Diffs
 -
 
   /asterisk/trunk/runtests.py 4350 
   /asterisk/trunk/lib/python/asterisk/asterisk.py 4350 
   /asterisk/trunk/lib/python/asterisk/Valgrind.py PRE-CREATION 
   /asterisk/trunk/lib/python/asterisk/TestConfig.py 4350 
   /asterisk/trunk/lib/python/asterisk/TestCase.py 4350 
   /asterisk/trunk/configs/valgrind.supp PRE-CREATION 
   /asterisk/trunk/README.txt 4350 
 
 Diff: https://reviewboard.asterisk.org/r/3027/diff/
 
 
 Testing
 ---
 
 Tested on 64bit and 32bit CentOS, including low cpu power conditions.  Some 
 sporadic timing issues affecting AMI/twisted operation have been seen and 
 will be corrected.
 
 
 Thanks,
 
 Scott Griepentrog
 


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Re: [asterisk-dev] [Code Review] 3027: Valgrind support in TestSuite

2013-12-08 Thread Matt Jordan

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



/asterisk/team/sgriepentrog/testsuite-valgrind/runtests.py
https://reviewboard.asterisk.org/r/3027/#comment19731

This review hasn't been updated with the options that are now in the team 
branch:

  -V, --valgrindRun Asterisk under valgrind
  --valgrind-gensuppGenerate suppression file for valgrind
  --valgrind-leak=VALGRIND_LEAK
Set leak check to one of: no, summary, yes, full
(default)
  --valgrind-undef=VALGRIND_UNDEF

When you get a chance, please resolve the findings and update the review. 
Tests that are being written that use the valgrind support to detect/find 
errors can't really be reviewed until this gets finalized.


- Matt Jordan


On Nov. 25, 2013, 11:10 p.m., Scott Griepentrog wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviewboard.asterisk.org/r/3027/
 ---
 
 (Updated Nov. 25, 2013, 11:10 p.m.)
 
 
 Review request for Asterisk Developers.
 
 
 Repository: testsuite
 
 
 Description
 ---
 
 This patch adds support for running Asterisk under Valgrind (say: 
 Val-Grinned) to check for all sorts of nasty runtime bugs.  This started off 
 with a post to asterisk-dev list by nitesh.ban...@gmail.com, and he wrote and 
 contributed the initial version.  So if you find this useful, be sure to 
 thank him.  Then I made extensive changes and additions, so if the code 
 stinks, blame me.
 
 The following has been done:
 
 - Check runtests.py arguments for --valgrind and --valgrind-gensupp flags, 
 pass via environ to TestCase.py
 - Note previously existing instances of ast# logs to insure we only process 
 new log/xml files
 - Increase reactor timeout by x5 when valgrind enabled
 - Patch to reactor_stop() to insure it does even when exceptions occur in 
 deferred stack
 - Add valgrind with correct arguments into executable path
 - After run, check valgrind.xml for errors, parse and condense them into 
 something more managable
 - If -gensup mode enabled, write suppressions to 
 logs/(test)/ast#/valgrind.supp that can be added (manually)
 - A default valgrind.supp suppressions file is in configs/ to prevent 
 complaints about known unfixables
 
 Notes:
 
 - valgrind can be triggered by argument to runtests.py, export VALGRIND=true, 
 or in test-config.yaml
 - configs/valgrind.supp will be used if found, but 
 tests/(test)/configs/valgrind.supp will take precedence
 - valgrind-gensupp mode will create example suppressions file, during which 
 no suppressions occur
 
 
 Diffs
 -
 
   /asterisk/team/sgriepentrog/testsuite-valgrind/runtests.py 4350 
   
 /asterisk/team/sgriepentrog/testsuite-valgrind/lib/python/asterisk/asterisk.py
  4350 
   
 /asterisk/team/sgriepentrog/testsuite-valgrind/lib/python/asterisk/TestRunner.py
  4350 
   
 /asterisk/team/sgriepentrog/testsuite-valgrind/lib/python/asterisk/TestConfig.py
  4350 
   
 /asterisk/team/sgriepentrog/testsuite-valgrind/lib/python/asterisk/TestCase.py
  4350 
   /asterisk/team/sgriepentrog/testsuite-valgrind/configs/valgrind.supp 
 PRE-CREATION 
 
 Diff: https://reviewboard.asterisk.org/r/3027/diff/
 
 
 Testing
 ---
 
 Tested on 64bit and 32bit CentOS, including low cpu power conditions.  Some 
 sporadic timing issues affecting AMI/twisted operation have been seen and 
 will be corrected.
 
 
 Thanks,
 
 Scott Griepentrog
 


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Re: [asterisk-dev] [Code Review] 3027: Valgrind support in TestSuite

2013-11-26 Thread Mark Michelson

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


In general, this looks like a good thing. The individual findings I have are 
quite few. There are some un-pythonic things going on in the code, the most 
common one being the way if statements are constructed. For instance, it's most 
common to have if statements that are if something or if not something when 
possible. So for instance, you could rewrite

if len(list):
do something

to

if list:
do something


and

if string != :
do something

to

if string:
do something


and

if True == boolean:
do something

to

if boolean:
do something


Some other pythonistas may wish to chime in if there are other changes that may 
be warranted here.


/asterisk/team/sgriepentrog/testsuite-valgrind/lib/python/asterisk/asterisk.py
https://reviewboard.asterisk.org/r/3027/#comment19660

I recommend outputting what the wrong output was.



/asterisk/team/sgriepentrog/testsuite-valgrind/runtests.py
https://reviewboard.asterisk.org/r/3027/#comment19658

I think you left a word out in this log message.


- Mark Michelson


On Nov. 25, 2013, 11:10 p.m., Scott Griepentrog wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviewboard.asterisk.org/r/3027/
 ---
 
 (Updated Nov. 25, 2013, 11:10 p.m.)
 
 
 Review request for Asterisk Developers.
 
 
 Repository: testsuite
 
 
 Description
 ---
 
 This patch adds support for running Asterisk under Valgrind (say: 
 Val-Grinned) to check for all sorts of nasty runtime bugs.  This started off 
 with a post to asterisk-dev list by nitesh.ban...@gmail.com, and he wrote and 
 contributed the initial version.  So if you find this useful, be sure to 
 thank him.  Then I made extensive changes and additions, so if the code 
 stinks, blame me.
 
 The following has been done:
 
 - Check runtests.py arguments for --valgrind and --valgrind-gensupp flags, 
 pass via environ to TestCase.py
 - Note previously existing instances of ast# logs to insure we only process 
 new log/xml files
 - Increase reactor timeout by x5 when valgrind enabled
 - Patch to reactor_stop() to insure it does even when exceptions occur in 
 deferred stack
 - Add valgrind with correct arguments into executable path
 - After run, check valgrind.xml for errors, parse and condense them into 
 something more managable
 - If -gensup mode enabled, write suppressions to 
 logs/(test)/ast#/valgrind.supp that can be added (manually)
 - A default valgrind.supp suppressions file is in configs/ to prevent 
 complaints about known unfixables
 
 Notes:
 
 - valgrind can be triggered by argument to runtests.py, export VALGRIND=true, 
 or in test-config.yaml
 - configs/valgrind.supp will be used if found, but 
 tests/(test)/configs/valgrind.supp will take precedence
 - valgrind-gensupp mode will create example suppressions file, during which 
 no suppressions occur
 
 
 Diffs
 -
 
   /asterisk/team/sgriepentrog/testsuite-valgrind/runtests.py 4350 
   
 /asterisk/team/sgriepentrog/testsuite-valgrind/lib/python/asterisk/asterisk.py
  4350 
   
 /asterisk/team/sgriepentrog/testsuite-valgrind/lib/python/asterisk/TestRunner.py
  4350 
   
 /asterisk/team/sgriepentrog/testsuite-valgrind/lib/python/asterisk/TestConfig.py
  4350 
   
 /asterisk/team/sgriepentrog/testsuite-valgrind/lib/python/asterisk/TestCase.py
  4350 
   /asterisk/team/sgriepentrog/testsuite-valgrind/configs/valgrind.supp 
 PRE-CREATION 
 
 Diff: https://reviewboard.asterisk.org/r/3027/diff/
 
 
 Testing
 ---
 
 Tested on 64bit and 32bit CentOS, including low cpu power conditions.  Some 
 sporadic timing issues affecting AMI/twisted operation have been seen and 
 will be corrected.
 
 
 Thanks,
 
 Scott Griepentrog
 


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Re: [asterisk-dev] [Code Review] 3027: Valgrind support in TestSuite

2013-11-25 Thread Scott Griepentrog

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

(Updated Nov. 25, 2013, 5:10 p.m.)


Review request for Asterisk Developers.


Changes
---

Added patch to waitfullybooted to fix problem where it really wasn't yet and 
failures would ensue.


Repository: testsuite


Description
---

This patch adds support for running Asterisk under Valgrind (say: Val-Grinned) 
to check for all sorts of nasty runtime bugs.  This started off with a post to 
asterisk-dev list by nitesh.ban...@gmail.com, and he wrote and contributed the 
initial version.  So if you find this useful, be sure to thank him.  Then I 
made extensive changes and additions, so if the code stinks, blame me.

The following has been done:

- Check runtests.py arguments for --valgrind and --valgrind-gensupp flags, pass 
via environ to TestCase.py
- Note previously existing instances of ast# logs to insure we only process new 
log/xml files
- Increase reactor timeout by x5 when valgrind enabled
- Patch to reactor_stop() to insure it does even when exceptions occur in 
deferred stack
- Add valgrind with correct arguments into executable path
- After run, check valgrind.xml for errors, parse and condense them into 
something more managable
- If -gensup mode enabled, write suppressions to logs/(test)/ast#/valgrind.supp 
that can be added (manually)
- A default valgrind.supp suppressions file is in configs/ to prevent 
complaints about known unfixables

Notes:

- valgrind can be triggered by argument to runtests.py, export VALGRIND=true, 
or in test-config.yaml
- configs/valgrind.supp will be used if found, but 
tests/(test)/configs/valgrind.supp will take precedence
- valgrind-gensupp mode will create example suppressions file, during which no 
suppressions occur


Diffs (updated)
-

  /asterisk/team/sgriepentrog/testsuite-valgrind/runtests.py 4350 
  
/asterisk/team/sgriepentrog/testsuite-valgrind/lib/python/asterisk/asterisk.py 
4350 
  
/asterisk/team/sgriepentrog/testsuite-valgrind/lib/python/asterisk/TestRunner.py
 4350 
  
/asterisk/team/sgriepentrog/testsuite-valgrind/lib/python/asterisk/TestConfig.py
 4350 
  
/asterisk/team/sgriepentrog/testsuite-valgrind/lib/python/asterisk/TestCase.py 
4350 
  /asterisk/team/sgriepentrog/testsuite-valgrind/configs/valgrind.supp 
PRE-CREATION 

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


Testing
---

Tested on 64bit and 32bit CentOS, including low cpu power conditions.  Some 
sporadic timing issues affecting AMI/twisted operation have been seen and will 
be corrected.


Thanks,

Scott Griepentrog

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

[asterisk-dev] [Code Review] 3027: Valgrind support in TestSuite

2013-11-22 Thread Scott Griepentrog

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

Review request for Asterisk Developers.


Repository: testsuite


Description
---

This patch adds support for running Asterisk under Valgrind (say: Val-Grinned) 
to check for all sorts of nasty runtime bugs.  This started off with a post to 
asterisk-dev list by nitesh.ban...@gmail.com, and he wrote and contributed the 
initial version.  So if you find this useful, be sure to thank him.  Then I 
made extensive changes and additions, so if the code stinks, blame me.

The following has been done:

- Check runtests.py arguments for --valgrind and --valgrind-gensupp flags, pass 
via environ to TestCase.py
- Note previously existing instances of ast# logs to insure we only process new 
log/xml files
- Increase reactor timeout by x5 when valgrind enabled
- Patch to reactor_stop() to insure it does even when exceptions occur in 
deferred stack
- Add valgrind with correct arguments into executable path
- After run, check valgrind.xml for errors, parse and condense them into 
something more managable
- If -gensup mode enabled, write suppressions to logs/(test)/ast#/valgrind.supp 
that can be added (manually)
- A default valgrind.supp suppressions file is in configs/ to prevent 
complaints about known unfixables

Notes:

- valgrind can be triggered by argument to runtests.py, export VALGRIND=true, 
or in test-config.yaml
- configs/valgrind.supp will be used if found, but 
tests/(test)/configs/valgrind.supp will take precedence
- valgrind-gensupp mode will create example suppressions file, during which no 
suppressions occur


Diffs
-

  /asterisk/team/sgriepentrog/testsuite-valgrind/runtests.py 4350 
  
/asterisk/team/sgriepentrog/testsuite-valgrind/lib/python/asterisk/asterisk.py 
4350 
  
/asterisk/team/sgriepentrog/testsuite-valgrind/lib/python/asterisk/TestRunner.py
 4350 
  
/asterisk/team/sgriepentrog/testsuite-valgrind/lib/python/asterisk/TestConfig.py
 4350 
  
/asterisk/team/sgriepentrog/testsuite-valgrind/lib/python/asterisk/TestCase.py 
4350 
  /asterisk/team/sgriepentrog/testsuite-valgrind/configs/valgrind.supp 
PRE-CREATION 

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


Testing
---

Tested on 64bit and 32bit CentOS, including low cpu power conditions.  Some 
sporadic timing issues affecting AMI/twisted operation have been seen and will 
be corrected.


Thanks,

Scott Griepentrog

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev