com php-src: rework that test to allow delta for rounding errors: ext/pdo_pgsql/tests/bug69752.phpt

From: Date: Thu, 11 Jun 2015 15:05:03 +0000
Subject: com php-src: rework that test to allow delta for rounding errors: ext/pdo_pgsql/tests/bug69752.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-87213@lists.php.net to get a copy of this message
Commit: a037b6de213c0326bcff486d9608a56965059725 Author: Anatol Belski <ab@php.net> Thu, 11 Jun 2015 17:05:03 +0200 Parents: dcfd1153ec9a45e055081c8f1f44c6eef919588c Branches: PHP-5.5 PHP-5.6 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a037b6de213c0326bcff486d9608a56965059725 Log: rework that test to allow delta for rounding errors If this workout doesn't make travis happy, the patch needs to be reviewed as the leak might still persist. Changed paths: M ext/pdo_pgsql/tests/bug69752.phpt Diff: diff --git a/ext/pdo_pgsql/tests/bug69752.phpt b/ext/pdo_pgsql/tests/bug69752.phpt index 6cf9a0a..bb7e5e8 100644 --- a/ext/pdo_pgsql/tests/bug69752.phpt +++ b/ext/pdo_pgsql/tests/bug69752.phpt @@ -42,7 +42,8 @@ for($i = 0; $i < $max; $i++) { if ($first_time_usage === null) $first_time_usage = $usage; - if ($first_time_usage != $usage){ + /* Use delta instead of direct comparison here */ + if (abs($first_time_usage - $usage) > 3){ printf("Memory Leak Detected: %d != %d\n", $usage, $first_time_usage); break; }

« previous php.cvs (#87213) next »