From: Yedaya Katsman Date: Sat, 7 Jun 2025 18:44:35 +0000 (+0300) Subject: tests: fail torture if !valgrind&threaded resolver X-Git-Tag: curl-8_15_0~308 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=05ffeeda0c8f6718f979ea5c7fe06ab20b42a5f4;p=thirdparty%2Fcurl.git tests: fail torture if !valgrind&threaded resolver We don't check the memory debug output with the threaded resolver, so the only way to do it with with valgrind. Also move the disabling of memory tracking to where we log that we're doing it. Closes #17501 --- diff --git a/tests/runtests.pl b/tests/runtests.pl index 4e92f03d41..0b08bb22de 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -834,9 +834,16 @@ sub checksystemfeatures { chomp $has_shared; $has_shared = $has_shared eq "yes"; - if(!$feature{"TrackMemory"} && $torture) { - die "can't run torture tests since curl was built without ". - "TrackMemory feature (--enable-curldebug)"; + + if($torture) { + if(!$feature{"TrackMemory"}) { + die "can't run torture tests since curl was built without ". + "TrackMemory feature (--enable-curldebug)"; + } + if ($feature{"threaded-resolver"} && !$valgrind) { + die "can't run torture tests since curl was built with the ". + "threaded resolver, and we aren't running with valgrind"; + } } my $hostname=join(' ', runclientoutput("hostname")); @@ -871,10 +878,12 @@ sub checksystemfeatures { # Only show if not the default for now logmsg "* Jobs: $jobs\n"; } + # Disable memory tracking when using threaded resolver if($feature{"TrackMemory"} && $feature{"threaded-resolver"}) { logmsg("*\n", "*** DISABLES TrackMemory (memory tracking) when using threaded resolver\n", "*\n"); + $feature{"TrackMemory"} = 0; } logmsg sprintf("* Env: %s%s%s%s%s", $valgrind?"Valgrind ":"", @@ -884,10 +893,6 @@ sub checksystemfeatures { $nghttpx_h3); logmsg sprintf("%s\n", $libtool?"Libtool ":""); logmsg ("* Seed: $randseed\n"); - - # Disable memory tracking when using threaded resolver - $feature{"TrackMemory"} = $feature{"TrackMemory"} && !$feature{"threaded-resolver"}; - } #######################################################################