Bug #70580 [Opn->Csd]: Test Zend/tests/bug42143.phpt is broken
| From: | carusogabriel@php.net | Date: | Sun, 05 Aug 2018 05:00:40 +0000 |
| Subject: | Bug #70580 [Opn->Csd]: Test Zend/tests/bug42143.phpt is broken | ||
| References: | 1 | Groups: | php.bugs php.qa |
| Request: | Send a blank email to php-bugs+get-216599@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=70580&edit=1
ID: 70580
Updated by: carusogabriel@php.net
Reported by: rainer dot jung at kippdata dot de
Summary: Test Zend/tests/bug42143.phpt is broken
-Status: Open
+Status: Closed
Type: Bug
Package: Testing related
Operating System: Solaris
PHP Version: 7.0.0RC3
-Assigned To:
+Assigned To: carusogabriel
Block user comment: N
Private report: N
New Comment:
Closing as this tests isn't failing anymore: http://gcov.php.net/viewer.php?version=PHP_HEAD&func=tests
Previous Comments:
------------------------------------------------------------------------
[2015-10-24 04:48:25] kalle@php.net
Now its been a while with proper testing writing, but I think its possible that we change the EXPECT
section to EXPECTF and then have something like: %NaN|INF% or similar, I should probably consult
run-tests.php for this, but it seems most reasonable we keep the test for most code path coverage.
------------------------------------------------------------------------
[2015-09-25 12:05:16] rainer dot jung at kippdata dot de
This applies also to PHP 5.4-5.6 (latest releases).
------------------------------------------------------------------------
[2015-09-25 11:59:46] rainer dot jung at kippdata dot de
Description:
------------
The test Zend/tests/bug42143.phpt contains:
13 var_dump(log10(-1) == log(-1));
14 var_dump(log10(-1) != log10(-1));
On Linux, that test works, because the logarithm of -1 returns NAN as expected. On Solaris the log
returns -INF and that part of the test fails. This behavior is allowed by the specifications: See in
http://pubs.opengroup.org/onlinepubs/9699919799/functions/log.html
"For finite values of x that are less than 0 ..., a domain error shall occur, and either a NaN
(if supported), or an implementation-defined value shall be returned."
Since there are a lot of other but similar tests in Zend/tests/bug42143.phpt, I suggest to drop
these two lines.
See attached patch.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=70580&edit=1