#30249 [Opn->Csd]: bogus failures in run-tests.php
| From: | iliaa@php.net | Date: | Mon, 27 Sep 2004 17:31:02 +0000 |
| Subject: | #30249 [Opn->Csd]: bogus failures in run-tests.php | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-66768@lists.php.net to get a copy of this message | ||
ID: 30249
Updated by: iliaa@php.net
Reported By: estar at cs dot tu-berlin dot de
-Status: Open
+Status: Closed
Bug Type: *Compile Issues
Operating System: SunOS 5.9
PHP Version: 5.0.1
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2004-09-27 03:35:17] estar at cs dot tu-berlin dot de
Description:
------------
Whenever the stream_select call in run-tests.php returns FALSE, the
script assumes a timeout. This causes tests to randomly fail if the
system call is interrupted.
PHP configuration:
Configure Command => './configure' '--prefix=/home/pub'
'--with-layout=GNU' '--with-openssl=/usr/local/openssl' '--with-zlib'
'--enable-bcmath=shared' '--with-bz2=shared' '--enable-calendar'
'--with-curl=shared,/home/pub' '--enable-dba=shared' '--with-inifile'
'--with-flatfile' '--enable-dbase=shared' '--enable-dio'
'--enable-ftp=shared' '--with-gd=shared'
'--with-gettext=shared,/home/pub' '--with-iconv=shared,/home/pub'
'--with-imap-ssl' '--with-mcrypt=shared,/home/pub'
'--with-mhash=shared,/home/pub' '--with-mime-magic'
'--with-ncurses=shared' '--enable-pcntl'
'--with-pspell=shared,/home/pub' '--with-readline' '--enable-shmop'
'--enable-sockets' '--enable-sysvsem' '--enable-sysvshm'
'--enable-yp'
'--with-libxml-dir=/home/pub' '--with-gmp=shared,/home/pub'
'--enable-fastcgi' '--enable-sigchild'
'--with-freetype-dir=/home/pub/lib/freetype2' '--enable-mbstring'
'--with-recode=/home/pub' '--with-openssl-dir=/usr/local/openssl'
'--enable-sqlite-utf8' '--enable-sysvmsg' '--with-xsl=/home/pub'
'--enable-memory-limit' '--enable-zend-multibyte'
php.ini settings: nothing relevant changed (compared to php.ini-dist).
Fix (should be more complicated, checking for actual errors (like
EBADF) vs. EINTR (Is this possible?)):
--- run-tests.php 2004-09-27 02:56:48.265755000 +0200
+++ run-tests.php 2004-09-27 02:59:09.631245000 +0200
@@ -620,7 +620,7 @@
$e = null;
$n = @stream_select($r, $w, $e, 60);
- if ($n == 0) {
+ if ($n === 0) {
/* timed out */
$data .= "\n ** ERROR: process timed out
**\n";
proc_terminate($proc);
(Since run-tests2.php uses the same code, it could have the same
problem. Not tested.)
Note: this is for PHP version 5.0.2; no option for 5.0.2 was available
at time of filing, so I've selected 5.0.1.
HTH
Reproduce code:
---------------
(No reproduce code, apart from run-tests.php itself.)
Expected result:
----------------
Test output with FAILures for actual bugs, while everything else
PASSes.
Actual result:
--------------
Tests FAIL randomly. "** ERROR: process timed out **" appears in
results file for tests which finished in certainly less than one
minute.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30249&edit=1