Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87896 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 70153 invoked from network); 24 Aug 2015 22:18:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Aug 2015 22:18:16 -0000 Authentication-Results: pb1.pair.com header.from=themattficken@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=themattficken@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.171 as permitted sender) X-PHP-List-Original-Sender: themattficken@gmail.com X-Host-Fingerprint: 209.85.217.171 mail-lb0-f171.google.com Received: from [209.85.217.171] ([209.85.217.171:36824] helo=mail-lb0-f171.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 22/D1-56843-6289BD55 for ; Mon, 24 Aug 2015 18:18:15 -0400 Received: by lbbpu9 with SMTP id pu9so88748728lbb.3 for ; Mon, 24 Aug 2015 15:18:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=LCRwVSWYGsi4SvspDcaDvvhN8byyATQ6VN4E7qSNgYo=; b=thoNJGIrWuAoZmaNnPZphX6UtnRJDKEby2zScZIVBlNvxSbmEbDRilcTshz1kVYpAI W9IarbBIIVqStlyOx2+q5o3+5gGairY3rsWBU4mr13ZinJzT+P4mqCiNOxPqKcrZ5qFR fOwuzBYq9hkOH8cF/B/Kg5KtvpUqlSBurhe5J6NbR/ZtC4tPKL5ePWUBzC16F1kx2dOv N7332LlYJo8VkbwRFoze5zKQ5e2thdq7L8oimtuFYPyinEPsRSaojvXzYH1hreFN2XX0 9JN18XqL4fTg5sCZQ+2fswKPl6wYo4DB9NPKqffqH2Xm6Th3UEpJ/v7fwGHlKb2EYzOR J7/A== MIME-Version: 1.0 X-Received: by 10.112.172.201 with SMTP id be9mr22004439lbc.39.1440454691617; Mon, 24 Aug 2015 15:18:11 -0700 (PDT) Received: by 10.112.148.135 with HTTP; Mon, 24 Aug 2015 15:18:11 -0700 (PDT) In-Reply-To: References: Date: Mon, 24 Aug 2015 15:18:11 -0700 Message-ID: To: Eric Stenson Cc: PHP Internals Content-Type: multipart/alternative; boundary=001a11c3888e358170051e15feea Subject: Re: [PHP-DEV] Q: Writing *.phpt's: How to specify multi-process test? From: themattficken@gmail.com (Matt Ficken) --001a11c3888e358170051e15feea Content-Type: text/plain; charset=UTF-8 Clarification: your test depends on being able to run multiple instances of the same test at the same time? run-tests runs one test at a time. It does launch a separate php.exe for each test, but it doesn't use non-blocking popen or pcntl, so it can only run one test at a time. see: http://git.php.net/?p=php-src.git;a=blob;f=run-tests.php;h=8222c7870973ee62253304b39888ed4b1b067715;hb=refs/heads/master#l1103 Additionally, you need to specify which tests must be run at same time (and how many, 2, 3, 4), neither of which run-tests is designed to do(its a light weight tool as opposed to PFTT which is very heavy weight). Alternatively, PFTT normally runs multiple tests at the same time and has a few extensions to the PHPT format. I could add another extension to the PHPT format to PFTT for your test. Extensions for PHPT test would specify which tests have to be run at same time, how many to run (2, 3, 4) and optionally skip test on run-tests. see: http://git.php.net/?p=pftt2.git;a=blob;f=src/com/mostc/pftt/model/core/EPhptSection.java;h=cf5ca582bcf604984b6bd3a8715838e9ee8fc075;hb=refs/heads/master#l14 Do you have a PHPT test written or pseudo code for one? That would help. Would be great to improve test coverage of WinCache (fe: there's some test php scripts afair that should be converted to PHPTs) Regards -M On Mon, Aug 24, 2015 at 10:31 AM, Eric Stenson wrote: > Good Morning PHP Internals! > > I'm trying to get some unit test coverage on some functionality that > requires two separate processes, and I'm wondering how to do this with a > *.phpt. > > WinCache has a cross-process lock functionality that allows > synchronization between two processes. (See: > http://php.net/manual/en/function.wincache-lock.php). > > I looked through https://qa.php.net/write-test.php, but I'm not seeing > anything that supports spinning up multiple instances of the test. > > Is there any special handling a phpt needs to do if it calls exec()? ( > http://php.net/manual/en/function.exec.php) > > Thx! > --E. > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --001a11c3888e358170051e15feea--