php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30249 bogus failures in run-tests.php
Submitted: 2004-09-27 03:35 UTC Modified: 2004-09-27 19:30 UTC
From: estar at cs dot tu-berlin dot de Assigned:
Status: Closed Package: *Compile Issues
PHP Version: 5.0.1 OS: SunOS 5.9
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: estar at cs dot tu-berlin dot de
New email:
PHP Version: OS:

 

 [2004-09-27 03:35 UTC] 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.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-09-27 19:31 UTC] iliaa@php.net
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.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 23:01:30 2024 UTC