You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Steve Hay <st...@uk.radan.com> on 2005/03/30 12:27:29 UTC
Test failure on Win32: t/error/runtime.t
Using bleadperl (@24099), svn mp2 (rev 159469), Apache 2.0.53 on WinXP I
have t/error/runtime.t failing tests 7, 9, 11.
Attached is console output and the relevant bits from error_log.
- Steve
------------------------------------------------
Radan Computational Ltd.
The information contained in this message and any files transmitted with it are confidential and intended for the addressee(s) only. If you have received this message in error or there are any problems, please notify the sender immediately. The unauthorized use, disclosure, copying or alteration of this message is strictly forbidden. Note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Radan Computational Ltd. The recipient(s) of this message should check it and any attached files for viruses: Radan Computational will accept no liability for any damage caused by any virus transmitted by this email.
Re: Test failure on Win32: t/error/runtime.t
Posted by Stas Bekman <st...@stason.org>.
Randy Kobes wrote:
> On Fri, 8 Apr 2005, Stas Bekman wrote:
>
>
>>eval block has failed: APR::Socket::recv: (730035) A
>>non-blocking socket operation could not be completed
>>immediately. at
>>C:\\apache2\\source\\mod_perl-2.0\\t\\response/TestError/runtime.pm
>>line 156 at
>>C:\\apache2\\source\\mod_perl-2.0\\t\\response/TestError/runtime.pm
>>line 114.\n
>>
>>1) I suppose 730035 is not APR::Const::EAGAIN, so it
>>doesn't retry as the test goes. Or does it? Try printing:
>
> [ ... ]
>
>>so, it looks again the same issue. You are probably
>>getting a different $@ under windows.
>>
>>I guess we could find out what is that constant, or try to
>>use a different operation that will certainly fail and
>>it'll give the same error constant on all platforms.
>>Suggestions are welcome.
>
>
> You're right that the problem is is that a different $@
> (730035) is obtained, rather than APR::Const::EAGAIN (which
> is 11 on Win32). On linux, I get 11 for both $@ and
> APR::Const::EAGAIN on this test.
>
> I think getting 730035 can be understood as follows:
> in apr_errorno.h, there's a macro
>
> #define APR_STATUS_IS_EAGAIN(s) ((s) == APR_EAGAIN \
> || (s) == APR_OS_START_SYSERR + ERROR_NO_DATA \
> || (s) == APR_OS_START_SYSERR + SOCEWOULDBLOCK \
> || (s) == APR_OS_START_SYSERR + ERROR_LOCK_VIOLATION)
>
>
> which is the suggested way to test for EAGAIN. On Win32,
> I believe that SOCEWOULDBLOCK is returned in this test,
> and following through the definitions in apr_errorno.h:
> =============================================================
> use constant APR_OS_START_ERROR => 20000;
> use constant APR_OS_ERRSPACE_SIZE => 50000;
> use constant APR_OS_START_STATUS =>
> (APR_OS_START_ERROR + APR_OS_ERRSPACE_SIZE);
> use constant APR_OS_START_USERERR =>
> (APR_OS_START_STATUS + APR_OS_ERRSPACE_SIZE);
> use constant APR_OS_START_USEERR => APR_OS_START_USERERR;
> use constant APR_OS_START_CANONERR =>
> (APR_OS_START_USERERR + (APR_OS_ERRSPACE_SIZE * 10));
> use constant APR_OS_START_EAIERR =>
> (APR_OS_START_CANONERR + APR_OS_ERRSPACE_SIZE);
> use constant APR_OS_START_SYSERR =>
> (APR_OS_START_EAIERR + APR_OS_ERRSPACE_SIZE);
> use constant SOCBASEERR => 10000;
> use constant SOCEWOULDBLOCK => (SOCBASEERR+35);
> ===================================================================
> one then finds APR_OS_START_SYSERR + SOCEWOULDBLOCK is
> indeed 730035, which would cause APR_STATUS_IS_EAGAIN(s) to
> be true. In the sense of APR_STATUS_IS_EAGAIN(), then, I
> think the test as written should be considered as having
> passed on Win32.
>
> So what we could do is, instead of using APR::Const::EAGAIN,
> put in a APR_STATUS_IS_EAGAIN() sub based on the above
> macro. This has the downside of requiring all the above
> constants to be defined within the test, as they're not
> available within APR::Const::*.
Thanks for the research, Randy.
How about a simpler solution. Create a new APR::Status class and have
IS_EAGAIN function in it. No need to load any constants, as it'll be on
the C level. Notice that this issue is essential for all uses, not just to
make the test pass.
Later we may need to add other IS_* status checking subs. I see there are
quite a lot of those.
--
__________________________________________________________________
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
Re: Test failure on Win32: t/error/runtime.t
Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Fri, 8 Apr 2005, Stas Bekman wrote:
> eval block has failed: APR::Socket::recv: (730035) A
> non-blocking socket operation could not be completed
> immediately. at
> C:\\apache2\\source\\mod_perl-2.0\\t\\response/TestError/runtime.pm
> line 156 at
> C:\\apache2\\source\\mod_perl-2.0\\t\\response/TestError/runtime.pm
> line 114.\n
>
> 1) I suppose 730035 is not APR::Const::EAGAIN, so it
> doesn't retry as the test goes. Or does it? Try printing:
[ ... ]
> so, it looks again the same issue. You are probably
> getting a different $@ under windows.
>
> I guess we could find out what is that constant, or try to
> use a different operation that will certainly fail and
> it'll give the same error constant on all platforms.
> Suggestions are welcome.
You're right that the problem is is that a different $@
(730035) is obtained, rather than APR::Const::EAGAIN (which
is 11 on Win32). On linux, I get 11 for both $@ and
APR::Const::EAGAIN on this test.
I think getting 730035 can be understood as follows:
in apr_errorno.h, there's a macro
#define APR_STATUS_IS_EAGAIN(s) ((s) == APR_EAGAIN \
|| (s) == APR_OS_START_SYSERR + ERROR_NO_DATA \
|| (s) == APR_OS_START_SYSERR + SOCEWOULDBLOCK \
|| (s) == APR_OS_START_SYSERR + ERROR_LOCK_VIOLATION)
which is the suggested way to test for EAGAIN. On Win32,
I believe that SOCEWOULDBLOCK is returned in this test,
and following through the definitions in apr_errorno.h:
=============================================================
use constant APR_OS_START_ERROR => 20000;
use constant APR_OS_ERRSPACE_SIZE => 50000;
use constant APR_OS_START_STATUS =>
(APR_OS_START_ERROR + APR_OS_ERRSPACE_SIZE);
use constant APR_OS_START_USERERR =>
(APR_OS_START_STATUS + APR_OS_ERRSPACE_SIZE);
use constant APR_OS_START_USEERR => APR_OS_START_USERERR;
use constant APR_OS_START_CANONERR =>
(APR_OS_START_USERERR + (APR_OS_ERRSPACE_SIZE * 10));
use constant APR_OS_START_EAIERR =>
(APR_OS_START_CANONERR + APR_OS_ERRSPACE_SIZE);
use constant APR_OS_START_SYSERR =>
(APR_OS_START_EAIERR + APR_OS_ERRSPACE_SIZE);
use constant SOCBASEERR => 10000;
use constant SOCEWOULDBLOCK => (SOCBASEERR+35);
===================================================================
one then finds APR_OS_START_SYSERR + SOCEWOULDBLOCK is
indeed 730035, which would cause APR_STATUS_IS_EAGAIN(s) to
be true. In the sense of APR_STATUS_IS_EAGAIN(), then, I
think the test as written should be considered as having
passed on Win32.
So what we could do is, instead of using APR::Const::EAGAIN,
put in a APR_STATUS_IS_EAGAIN() sub based on the above
macro. This has the downside of requiring all the above
constants to be defined within the test, as they're not
available within APR::Const::*.
--
best regards,
randy
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: Test failure on Win32: t/error/runtime.t
Posted by Stas Bekman <st...@stason.org>.
Steve Hay wrote:
> Stas Bekman wrote:
>
>
>>Steve Hay wrote:
>>
>>
>>
>>>Using bleadperl (@24099), svn mp2 (rev 159469), Apache 2.0.53 on WinXP I
>>>have t/error/runtime.t failing tests 7, 9, 11.
>>>
>>>Attached is console output and the relevant bits from error_log.
>>>
>>>
>>
>>Could it be related to this change:
>>http://svn.apache.org/viewcvs.cgi/perl/modperl/trunk/t/response/TestError/runtime.pm?rev=156118&r1=70923&r2=156118&diff_format=h
>>
>>i.e. the one that did: s/APR::TIMEUP/APR::EAGAIN/, try reversing it?
>>
>
> Tests 7, 9, 11 are eval_block_mp_error, eval_string_mp_error,
> overload_test respectively.
>
> Reverting the change cited above changes EAGAIN back to TIMEUP in
> eval_block_mp_error and eval_string_mp_error and removes overload_test.
> This removes test 11, and hence removes that failure ;), but tests 7 and
> 9 still fail.
OK, so it's not s/APR::TIMEUP/APR::EAGAIN/. The only thing that has certainly changed is that the overload of APR::Error now works correctly, which wasn't the case before.
Why your error log doesn't have these logs? Makes it hard to tell real errors from expected ones.
*** The following error entry is expected and harmless ***
You can see, it's done by t_server_log_error_is_expected(); imported from Apache::TestUtil. Any chance you could check where it disappears?
So #7 eval_block_mp_error gives us:
eval block has failed: APR::Socket::recv: (730035) A non-blocking socket operation could not be completed immediately. at C:\\apache2\\source\\mod_perl-2.0\\t\\response/TestError/runtime.pm line 156 at C:\\apache2\\source\\mod_perl-2.0\\t\\response/TestError/runtime.pm line 114.\n
1) I suppose 730035 is not APR::Const::EAGAIN, so it doesn't retry as the test goes. Or does it? Try printing:
warn "APR::Const::EAGAIN value: " . APR::Const::EAGAIN+0;
to see what's the error id it matches.
2) If it is (730035) then try to raise the number of tries and see if it makes any difference.
#9 eval_string_mp_error gives us:
eval string has failed: APR::Socket::recv: (730035) A non-blocking socket operation could not be completed immediately. at (eval 124) line 1 at C:\\apache2\\source\\mod_perl-2.0\\t\\response/TestError/runtime.pm line 125.\n
This is exactly the same as #7.
#11 overload_test gives us:
'==' overload is broken at C:\\apache2\\source\\mod_perl-2.0\\t\\response/TestError/runtime.pm line 46.\n
1) it fails here:
die "'==' overload is broken" unless $@ == APR::Const::EAGAIN;
so, it looks again the same issue. You are probably getting a different $@ under windows.
I guess we could find out what is that constant, or try to use a different operation that will certainly fail and it'll give the same error constant on all platforms. Suggestions are welcome.
--
__________________________________________________________________
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
Re: Test failure on Win32: t/error/runtime.t
Posted by Steve Hay <st...@uk.radan.com>.
Stas Bekman wrote:
>Steve Hay wrote:
>
>
>>Using bleadperl (@24099), svn mp2 (rev 159469), Apache 2.0.53 on WinXP I
>>have t/error/runtime.t failing tests 7, 9, 11.
>>
>>Attached is console output and the relevant bits from error_log.
>>
>>
>
>Could it be related to this change:
>http://svn.apache.org/viewcvs.cgi/perl/modperl/trunk/t/response/TestError/runtime.pm?rev=156118&r1=70923&r2=156118&diff_format=h
>
>i.e. the one that did: s/APR::TIMEUP/APR::EAGAIN/, try reversing it?
>
Tests 7, 9, 11 are eval_block_mp_error, eval_string_mp_error,
overload_test respectively.
Reverting the change cited above changes EAGAIN back to TIMEUP in
eval_block_mp_error and eval_string_mp_error and removes overload_test.
This removes test 11, and hence removes that failure ;), but tests 7 and
9 still fail.
------------------------------------------------
Radan Computational Ltd.
The information contained in this message and any files transmitted with it are confidential and intended for the addressee(s) only. If you have received this message in error or there are any problems, please notify the sender immediately. The unauthorized use, disclosure, copying or alteration of this message is strictly forbidden. Note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Radan Computational Ltd. The recipient(s) of this message should check it and any attached files for viruses: Radan Computational will accept no liability for any damage caused by any virus transmitted by this email.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: Test failure on Win32: t/error/runtime.t
Posted by Stas Bekman <st...@stason.org>.
Steve Hay wrote:
> Using bleadperl (@24099), svn mp2 (rev 159469), Apache 2.0.53 on WinXP I
> have t/error/runtime.t failing tests 7, 9, 11.
>
> Attached is console output and the relevant bits from error_log.
Could it be related to this change:
http://svn.apache.org/viewcvs.cgi/perl/modperl/trunk/t/response/TestError/runtime.pm?rev=156118&r1=70923&r2=156118&diff_format=h
i.e. the one that did: s/APR::TIMEUP/APR::EAGAIN/, try reversing it?
--
__________________________________________________________________
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