]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
runtests.pl: fix precedence issue
authormauke <lukasmai.403@gmail.com>
Thu, 30 Jan 2025 05:28:50 +0000 (06:28 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 3 Feb 2025 19:04:12 +0000 (20:04 +0100)
The condition `!$cmdtype eq "perl"` (introduced in a4765b0551) is always
false. It checks whether a logical negation (giving true/false) is equal
to the string `"perl"`. This is impossible, so the logging never worked.

The intent was probably to negate the result of the string
comparison:`!($cmdtype eq "perl")` or simply `$cmdtype ne "perl"`.

Fixes #16128
Reported-by: Igor Todorovski
Closes #16129

tests/runtests.pl

index e28fd56e50d5e7ebfa912de3df60bb07ce8d1b34..0ca69fec4c8acb5f56f9940d729b0bc050f8fd19 100755 (executable)
@@ -1672,7 +1672,7 @@ sub singletest_check {
             my %cmdhash = getpartattr("client", "command");
             my $cmdtype = $cmdhash{'type'} || "default";
             logmsg "\n** ALERT! memory tracking with no output file?\n"
-                if(!$cmdtype eq "perl");
+                if($cmdtype ne "perl");
             $ok .= "-"; # problem with memory checking
         }
         else {