[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 53/73: runtests: use valgrind for torture as well
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 53/73: runtests: use valgrind for torture as well |
Date: |
Tue, 24 Oct 2017 18:54:34 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit ed0b6b18f6d930d7123d14a1bdd0f3cc73dcb83b
Author: Daniel Stenberg <address@hidden>
AuthorDate: Tue Oct 10 22:52:17 2017 +0200
runtests: use valgrind for torture as well
NOTE: it makes them terribly slow. I recommend only using valgrind for
specific torture tests or using lots of patience.
---
tests/runtests.pl | 42 ++++++++++++++++++++++++++++++++++--------
1 file changed, 34 insertions(+), 8 deletions(-)
diff --git a/tests/runtests.pl b/tests/runtests.pl
index 39362e0b8..f493c7808 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -561,8 +561,7 @@ sub runclientoutput {
# Memory allocation test and failure torture testing.
#
sub torture {
- my $testcmd = shift;
- my $gdbline = shift;
+ my ($testcmd, $testnum, $gdbline) = @_;
# remove memdump first to be sure we get a new nice and clean one
unlink($memdump);
@@ -610,6 +609,20 @@ sub torture {
# remove memdump first to be sure we get a new nice and clean one
unlink($memdump);
+ my $cmd = $testcmd;
+ if($valgrind && !$gdbthis) {
+ my @valgrindoption = getpart("verify", "valgrind");
+ if((address@hidden) || ($valgrindoption[0] !~ /disable/)) {
+ my $valgrindcmd = "$valgrind ";
+ $valgrindcmd .= "$valgrind_tool " if($valgrind_tool);
+ $valgrindcmd .= "--quiet --leak-check=yes ";
+ $valgrindcmd .= "--suppressions=$srcdir/valgrind.supp ";
+ # $valgrindcmd .= "--gen-suppressions=all ";
+ $valgrindcmd .= "--num-callers=16 ";
+ $valgrindcmd .= "${valgrind_logfile}=$LOGDIR/valgrind$testnum";
+ $cmd = "$valgrindcmd $testcmd";
+ }
+ }
logmsg "*** Function number $limit is now set to fail ***\n"
if($gdbthis);
my $ret = 0;
@@ -617,7 +630,7 @@ sub torture {
runclient($gdbline);
}
else {
- $ret = runclient($testcmd);
+ $ret = runclient($cmd);
}
#logmsg "$_ Returned " . ($ret >> 8) . "\n";
@@ -631,6 +644,20 @@ sub torture {
$fail = 2;
}
+ if($valgrind) {
+ my @e = valgrindparse("$LOGDIR/valgrind$testnum");
+ if(@e && $e[0]) {
+ if($automakestyle) {
+ logmsg "FAIL: torture $testnum - valgrind\n";
+ }
+ else {
+ logmsg " valgrind ERROR ";
+ logmsg @e;
+ }
+ $fail = 1;
+ }
+ }
+
# verify that it returns a proper error code, doesn't leak memory
# and doesn't core dump
if(($ret & 255) || ($ret >> 8) >= 128) {
@@ -3173,7 +3200,7 @@ sub fixarray {
my @in = @_;
for(@in) {
- subVariables \$_;
+ subVariables(\$_);
}
return @in;
}
@@ -3638,7 +3665,7 @@ sub singletest {
if(@setenv) {
foreach my $s (@setenv) {
chomp $s;
- subVariables \$s;
+ subVariables(\$s);
if($s =~ /([^=]*)=(.*)/) {
my ($var, $content) = ($1, $2);
# remember current setting, to restore it once test runs
@@ -4003,7 +4030,8 @@ sub singletest {
# run the command line we built
if ($torture) {
$cmdres = torture($CMDLINE,
- "$gdb --directory libtest $DBGCURL -x $LOGDIR/gdbcmd");
+ $testnum,
+ "$gdb --directory libtest $DBGCURL -x
$LOGDIR/gdbcmd");
}
elsif($gdbthis) {
my $GDBW = ($gdbxwin) ? "-w" : "";
@@ -5310,8 +5338,6 @@ while(@ARGV) {
if($xtra =~ s/(\d+)$//) {
$tortalloc = $1;
}
- # we undef valgrind to make this fly in comparison
- undef $valgrind;
}
elsif($ARGV[0] eq "-a") {
# continue anyway, even if a test fail
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 31/73: openssl: enable PKCS12 support for !BoringSSL, (continued)
- [GNUnet-SVN] [gnurl] 31/73: openssl: enable PKCS12 support for !BoringSSL, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 40/73: openssl: don't use old BORINGSSL_YYYYMM macros, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 41/73: url: Update current connection SSL verify params in setopt, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 29/73: mime: properly unbind mime structure in curl_mime_free()., gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 32/73: FAQ: s/CURLOPT_PROGRESSFUNCTION/CURLOPT_XFERINFOFUNCTION, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 34/73: CURLOPT_XFERINFODATA.3: fix duplicate see also, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 46/73: cli tool: use file2memory() to buffer stdin in -F option., gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 25/73: mime: refuse to add subparts to one of their own descendants., gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 55/73: makefile.m32: allow to override gcc, ar and ranlib, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 50/73: mime: do not call failf() if easy handle is NULL., gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 53/73: runtests: use valgrind for torture as well,
gnunet <=
- [GNUnet-SVN] [gnurl] 49/73: test651: curl_formadd with huge COPYCONTENTS, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 63/73: runtests: support MultiSSL client feature, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 58/73: RELEASE-NOTES: synced with f121575c0, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 65/73: mime: do not reuse previously computed multipart size, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 59/73: mime: limit bas64-encoded lines length to 76 characters, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 69/73: mk-ca-bundle: Fix URL for NSS, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 72/73: RELEASE-NOTES: 7.56.1, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 70/73: mk-ca-bundle: Remove URL for aurora, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 04/73: fuzzer: move to using external curl-fuzzer, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 73/73: Merge tag 'curl-7_56_1' of https://github.com/curl/curl, gnunet, 2017/10/24