r82 - in regression_tests/tests: . 2021_session_valgrind

erik at minisip.org erik at minisip.org
Mon Jan 22 15:44:07 CET 2007


Author: erik
Date: 2007-01-22 15:44:05 +0100 (Mon, 22 Jan 2007)
New Revision: 82

Added:
   regression_tests/tests/2021_session_valgrind/
Modified:
   regression_tests/tests/2021_session_valgrind/test.sh
Log:

 * Added test that runs the "ua" test application using valgrind.

   If there are warnings that are ok (i.e. in libraries outside
   of our control) then we can add a suppression file to remove
   those from the "expected_output".



Copied: regression_tests/tests/2021_session_valgrind (from rev 75, regression_tests/tests/2014_Session_inviteab_hangupba_tcp)

Modified: regression_tests/tests/2021_session_valgrind/test.sh
===================================================================
--- regression_tests/tests/2014_Session_inviteab_hangupba_tcp/test.sh	2006-12-22 12:43:09 UTC (rev 75)
+++ regression_tests/tests/2021_session_valgrind/test.sh	2007-01-22 14:44:05 UTC (rev 82)
@@ -1,5 +1,16 @@
 #!/bin/bash
 
+#
+# This test uses valgrind to run the "ua" test application as 
+# a client. 
+#
+# Unfortunately, valid changes to the source code can affect 
+# the output of this test (such as source code line numbers
+# that is output by valgrind).
+#
+# (c) 2007 Erik Eliasson, eliasson at it.kth.se
+#
+
 make > build_output 2>&1  || exit 2
 
 SPORT=$RANDOM
@@ -12,7 +23,7 @@
 
 # regression test is done on clients output
 echo -e "sleep 1\ncall erik at localhost:${SPORT}\nsleep 8" |
-../../common/ua/ua -p $CPORT -u clientuser at domain.com -t tcp > test_output || exit 3
+valgrind -q --leak-check=full --log-fd=1 --num-callers=25 ../../common/ua/ua -p $CPORT -u clientuser at domain.com -t tcp > test_output || exit 3
 
 # make output predictable - i.e. remove callid and branch strings (pseudo-random) and port numbers
 sed -i "s/Call-ID:.*$/Call-ID: callidstring/" test_output
@@ -24,6 +35,10 @@
 sed -i "s/=$CPORT/:CLIENTPORT/" test_output
 sed -i "s/rport=[0-9][0-9]*/rport=REMOTETCPPORT/g" test_output
 
+# remove pid numbers from valgrind output
+sed -i "s/==[0-9]*==/==PID==/" test_output
+sed -i "s/--[0-9]*--/--PID--/" test_output
+
 if [ -e expected_output/expected_output ] ; then
         diff -u expected_output/expected_output test_output > diff_output ;
 else



More information about the Minisip-devel mailing list