Return-Path: Delivered-To: apmail-perl-dev-archive@www.apache.org Received: (qmail 93658 invoked from network); 1 Oct 2003 17:32:03 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 1 Oct 2003 17:32:03 -0000 Received: (qmail 21928 invoked by uid 500); 1 Oct 2003 17:31:54 -0000 Delivered-To: apmail-perl-dev-archive@perl.apache.org Received: (qmail 21916 invoked by uid 500); 1 Oct 2003 17:31:54 -0000 Mailing-List: contact dev-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list dev@perl.apache.org Received: (qmail 21903 invoked from network); 1 Oct 2003 17:31:53 -0000 Received: from unknown (HELO mail.logilune.com) (195.154.174.52) by daedalus.apache.org with SMTP; 1 Oct 2003 17:31:53 -0000 Received: from stason.org (localhost.logilune.com [127.0.0.1]) by mail.logilune.com (Postfix) with ESMTP id C1EC178DB1; Wed, 1 Oct 2003 19:31:55 +0200 (CEST) Message-ID: <3F7B0F89.1020901@stason.org> Date: Wed, 01 Oct 2003 10:31:53 -0700 From: Stas Bekman Organization: Hope, Humanized User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030630 X-Accept-Language: en-us, en, he, ru MIME-Version: 1.0 To: Steve Hay Cc: Randy Kobes , Barrie Slaymaker , mod_perl Dev Subject: Re: t/SMOKE on win32 References: <200309301950.h8UJoV125267@ironsides.slaysys.com> <3F79F1B4.2070804@stason.org> <3F7AF04E.2010003@uk.radan.com> In-Reply-To: <3F7AF04E.2010003@uk.radan.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Steve Hay wrote: > Randy Kobes wrote: > >> On Tue, 30 Sep 2003, Stas Bekman wrote: >> >> >> >>> Barrie Slaymaker wrote: >>> >>> >>>> On Sep 30 2003, Stas Bekman wrote: >>>> >>>> >>>> >>>>> Isn't IPC::Run3 based on IPC::Run? So if IPC::Run doesn't work... >>>>> >>>> >>>> No, it's smaller, faster, lighter ;) >>>> >>>> It's "all new code", no select(). Uses File::Temp >>>> temporary files to optionally queue up input for the >>>> child, runs the child, optionally with any stdout and/or >>>> stderr redirects to other temp files, then slurps the >>>> results. Simple. Portable. Relatively efficient for >>>> small to moderate amounts of data, especially when you >>>> start comparing it to the things that IPC::Run does when >>>> faced with the odd behaviors of Win32's anonymous pipe >>>> and TCP socket APIs (you want the child to have pipe()s, >>>> but you can't select() on pipes, and I don't know how to >>>> take a pipe handle that Win32 gives me and do a blocking >>>> poll on it a la select()--WaitForMultipleObjects() might >>>> do it, but I'm no guru there). >>>> >>> >>> So may be we could try it. If Randy says that it works for >>> him, we will happily move to use it instead ;) >>> >> >> >> And that does seem to work! A diff appears below (not tested >> on linux) - in this, I also added a change to TestServer.pm >> to print out a message on Win32 when shutting down the >> server, as that's expected when checking that the server >> successfully shut down in TestSmoke.pm. >> > This version gets SMOKE running, but it doesn't seem to be able to keep > running. > > I have a 1.99_10 build tree in which "nmake test" runs with all tests > successful every time, but when I try "perl t/SMOKE" with your patch > below, I find that one of the tests has an error and causes everything > to stop. > > I've tried it three times now. Each time I had it fail on a different > test (modperl\cookie, modperl\endav, modperl\post_utf8), but every time > I get this message written into t/logs/error_log: > > Failed to dup STDIN: Permission denied. That sounds bad. What it tries to do is: open my $oldout, ">&STDIN" or die "Can't dup STDIN: $!"; though using the C API: modperl_in.c:102 status = Perl_do_open(aTHX_ handle_save, ">&STDIN", 8, FALSE, O_RDONLY, 0, Nullfp); if (status == 0) { Perl_croak(aTHX_ "Failed to dup STDIN: %_", get_sv("!", TRUE)); } Hmm, looks like I can't count. Does this help: Index: src/modules/perl/modperl_io.c =================================================================== RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_io.c,v retrieving revision 1.11 diff -u -r1.11 modperl_io.c --- src/modules/perl/modperl_io.c 24 Aug 2003 19:37:29 -0000 1.11 +++ src/modules/perl/modperl_io.c 1 Oct 2003 17:30:27 -0000 @@ -99,7 +99,7 @@ MP_TRACE_o(MP_FUNC, "start"); /* open my $oldout, ">&STDIN" or die "Can't dup STDIN: $!"; */ - status = Perl_do_open(aTHX_ handle_save, ">&STDIN", 8, FALSE, O_RDONLY, + status = Perl_do_open(aTHX_ handle_save, ">&STDIN", 7, FALSE, O_RDONLY, 0, Nullfp); if (status == 0) { Perl_croak(aTHX_ "Failed to dup STDIN: %_", get_sv("!", TRUE)); > This is the only message in the log after the server has started up, and > it doesn't appear until the test fails. I'm using IPC::Run3 0.009 on > Perl 5.8.1 / Apache 2.0.47. Can you reproduce this problem outside t/SMOKE? You should be able to by doing: t/TEST -start t/TEST -run modperl\cookie t/TEST -stop since that's what t/SMOKE does > I also find that the SMOKE stops smoking when the test fails. For > example, here's the end of my third SMOKE run: > > ===== > [...] > modperl\post_utf8....request has failed (the response code was: 500) > see t/logs/error_log for more details > dubious > Test returned status 9 (wstat 2304, 0x900) > !!! error running tests (please examine t\logs\error_log) > *** server localhost:8529 is not running > !!! failed to stop server > *** server localhost:8529 is not running > ===== > > Is that supposed to happen? I thought it would have carried on, and > then given a report at the end of all the tests that failed. Maybe it's > just because the error that occurred actually took the Apache server > down. Perhaps SMOKE should have the ability to restart Apache if/when > that happens, so that it can carry on? This is by design. Normally you bring 'make test' to 100% completion, then you start looking for combinations of tests that may cause a failure. If it finds such a combination it tries to reduce it to the minimal sequence so it's easy to reproduce and debug. However if it finds that running a single test alone causes a failure, it immediately quits since what's the point of trying again if that test will fail again, no new results will be acquired. __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:stas@stason.org http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org For additional commands, e-mail: dev-help@perl.apache.org