#30249 [NEW]: bogus failures in run-tests.php
| From: | estar at cs dot tu-berlin dot de | Date: | Mon, 27 Sep 2004 01:35:37 +0000 |
| Subject: | #30249 [NEW]: bogus failures in run-tests.php | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-66737@lists.php.net to get a copy of this message | ||
From: estar at cs dot tu-berlin dot de
Operating system: SunOS 5.9
PHP version: 5.0.1
PHP Bug Type: *Compile Issues
Bug description: bogus failures in run-tests.php
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 bug report at http://bugs.php.net/?id=30249&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30249&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30249&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30249&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=30249&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=30249&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=30249&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=30249&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=30249&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30249&r=support
Expected behavior: http://bugs.php.net/fix.php?id=30249&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=30249&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=30249&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=30249&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30249&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=30249&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=30249&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30249&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=30249&r=float
MySQL Configuration Error: http://bugs.php.net/fix.php?id=30249&r=mysqlcfg