Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70444 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87787 invoked from network); 27 Nov 2013 18:54:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Nov 2013 18:54:24 -0000 Authentication-Results: pb1.pair.com header.from=ab@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=ab@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 85.214.73.107 as permitted sender) X-PHP-List-Original-Sender: ab@php.net X-Host-Fingerprint: 85.214.73.107 klapt.com Received: from [85.214.73.107] ([85.214.73.107:59496] helo=klapt.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 53/E3-03032-DDF36925 for ; Wed, 27 Nov 2013 13:54:24 -0500 Received: by klapt.com (Postfix, from userid 33) id A48F023D609E; Wed, 27 Nov 2013 19:54:18 +0100 (CET) Received: from 178.2.29.163 (SquirrelMail authenticated user anatol@belski.net) by webmail.klapt.com with HTTP; Wed, 27 Nov 2013 19:54:18 +0100 Message-ID: In-Reply-To: <9095b88708ea45cbbaffdcf645b96450@BLUPR03MB421.namprd03.prod.outlook.com> References: <3723aa16373647e5ad01f33992ac4c9c@BLUPR03MB421.namprd03.prod.outlook.com> <6e85635635da4ac193a5ba309d4dbd96@BLUPR03MB421.namprd03.prod.outlook.com> <9095b88708ea45cbbaffdcf645b96450@BLUPR03MB421.namprd03.prod.outlook.com> Date: Wed, 27 Nov 2013 19:54:18 +0100 To: "Eric Stenson" Cc: "Tjerk Meesters" , "Ferenc Kovacs" , "Nikita Popov" , "internals@lists.php.net" , "Pierre Joye" Reply-To: "Anatol Belski" User-Agent: SquirrelMail/1.5.2 [SVN] MIME-Version: 1.0 Content-Type: text/plain;charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: RE: [PHP-DEV] RE: Patch: Fixing some .phpt's that fail with Wincache From: ab@php.net ("Anatol Belski") Hi Eric, On Tue, November 26, 2013 18:35, Eric Stenson wrote: > From: Tjerk Meesters [mailto:tjerk.meesters@gmail.com] > Sent: Tuesday, November 26, 2013 1:42 AM > > >> On Tue, Nov 26, 2013 at 5:19 PM, Ferenc Kovacs >> > wrote: >> 2013.11.26. 7:31, "Nikita Popov" >> > ezt írta: >> >>> >>> On Mon, Nov 25, 2013 at 8:30 PM, Eric Stenson >>> >>> wrote: >>> > [...] > >>>> $ui1 = uniqid($str); >>>> +/* Must sleep here to let uniqid generate a different unique ID */ >>>> +usleep( 10 ); >>>> $ui2 = uniqid($str); >>>> >>>> >>>> $len = strncasecmp(PHP_OS, 'CYGWIN', 6) ? 19 : 29; >>>> >>>> >> >> Internally, uniqid() uses usleep(1) only if 'more entropy' is omitted >> and not on Windows and Cygwin (must use 'more entropy'). >> >> So, when 'more entropy' is present, it will skip usleep(1) but pad the >> result with php_combined_lcg(). >> >> I'm sure there was a good reason to do so, but it does seem >> counter-intuitive at best. >> > > Ah! My bad. Please remove the usleep(10) and add the ', true' (more > entropy) param to the uniqid() call. This test consistently fails on > Windows. > > > For completeness of coverage, you might consider also testing with the > usleep(1) and without the ', true' (more entropy) param. > > Thx! > --E. I'd suggest you to fork the PHP sources on github so you could make a pull request. Then it'll be more handy to discuss, test and complete the fixes. Which wincache codebase should I use to test your patch with PHP-5.6 branch? I'd willingly test when your fork is so far. Regards Anatol