[php-src] Issue #8400: test broken after build

From: Date: Tue, 19 Apr 2022 12:37:12 +0000
Subject: [php-src] Issue #8400: test broken after build
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-241072@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/8400 Author: evrinoma ### Description ### Description Hi. I try to build php engine from source code and I've got an error **Bug #73837: Milliseconds in DateTime() [ext/date/tests/bug73837.phpt]** The problem is here The following code: ```--TEST-- Bug #73837: Milliseconds in DateTime() --FILE-- <?php $collect = []; for ( $i = 0; $i < 1000; $i++ ) { $a = new DateTime(); $key = "s" . $a->format( "u" ); $collect[$key] = true; } $status=array_count_values($collect); var_dump($status); var_dump($n = count( $collect )); echo ( $n > 700 ) ? "microseconds differ\n" : "microseconds do not differ enough ($n)\n"; ?> --EXPECTF-- int(%d) microseconds differ ``` Could anybody explain me the reason to make this test? What would we like to test here? I suppose, each block iteration by $i isn't equal one second, cause we are working in user space OS. build params ./configure' '--build=x86_64' '--with-config-file-path=/usr/local/etc/php' '--with-config-file-scan-dir=/usr/local/etc/php/conf.d' '--enable-option-checking=fatal' '--with-mhash' '--disable-all' '--with-pic' '--with-password-argon2' '--with-zlib' '--enable-xml' '--with-libxml' '--disable-phpdbg' '--with-pear' '--disable-cgi' '--enable-fpm' '--with-fpm-user=www-data' '--with-fpm-group=www-data' 'build_alias=x86_64' ### PHP Version PHP 7.4.29 ### Operating System REHL ### PHP Version PHP 7.4.29 ### Operating System REHL

« previous php.bugs (#241072) next »