Mailing List Archive

[httpd24] t/directive/perlloadmodule3.t failure
We're seeing just one test failure with the httpd24 branch
and Apache 2.4.4:

> # Failed test 1 in t/directive/perlloadmodule3.t at line 38

This is an API change in Apache 2.4: the server_rec struct member types
have changed. In this case, is_virtual used to be an 'int' but is now a
'char'.

http://svn.apache.org/viewvc/httpd/httpd/trunk/include/httpd.h?r1=959392&r2=959464

Clearly mod_perl2 needs to somehow map the char to a Perl number. The
test failure happens because the zero byte "\0" is true in Perl and
so the is_virtual method always returns true.

I couldn't find existing infrastructure to do this mapping but maybe
I'm just missing it?
--
Niko Tyni ntyni@debian.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: [httpd24] t/directive/perlloadmodule3.t failure [ In reply to ]
On 06/23/2013 10:21 PM, Niko Tyni wrote:
> We're seeing just one test failure with the httpd24 branch
> and Apache 2.4.4:
>
>> # Failed test 1 in t/directive/perlloadmodule3.t at line 38
>
> This is an API change in Apache 2.4: the server_rec struct member types
> have changed. In this case, is_virtual used to be an 'int' but is now a
> 'char'.
>
> http://svn.apache.org/viewvc/httpd/httpd/trunk/include/httpd.h?r1=959392&r2=959464
>
> Clearly mod_perl2 needs to somehow map the char to a Perl number. The
> test failure happens because the zero byte "\0" is true in Perl and
> so the is_virtual method always returns true.
>
> I couldn't find existing infrastructure to do this mapping but maybe
> I'm just missing it?

Try it with attached patch. I haven't tried to run the tests with the
patch applied, but from the generated code it looks like it should
return int now.

Regards,
Jan Kaluza
Re: [httpd24] t/directive/perlloadmodule3.t failure [ In reply to ]
On Mon, Jun 24, 2013 at 01:13:58PM +0200, Jan Kaluža wrote:
> On 06/23/2013 10:21 PM, Niko Tyni wrote:

> >># Failed test 1 in t/directive/perlloadmodule3.t at line 38

> > http://svn.apache.org/viewvc/httpd/httpd/trunk/include/httpd.h?r1=959392&r2=959464
> >
> >Clearly mod_perl2 needs to somehow map the char to a Perl number. The
> >test failure happens because the zero byte "\0" is true in Perl and
> >so the is_virtual method always returns true.

> Try it with attached patch. I haven't tried to run the tests with
> the patch applied, but from the generated code it looks like it
> should return int now.

Thanks, but that doesn't quite work here:
t/directive/perlloadmodule3.t .. 1/3 # Failed test 1 in t/directive/perlloadmodule3.t at line 38
# Failed test 2 in t/directive/perlloadmodule3.t at line 69
# Failed test 3 in t/directive/perlloadmodule3.t at line 97
t/directive/perlloadmodule3.t .. Failed 3/3 subtests
t/directive/perlloadmodule4.t .. Failed 3/3 subtests
t/directive/perlloadmodule5.t .. Failed 3/3 subtests
t/directive/perlloadmodule6.t .. Failed 3/3 subtests

Will look into it properly later.
--
Niko Tyni ntyni@debian.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: [httpd24] t/directive/perlloadmodule3.t failure [ In reply to ]
On 06/24/2013 11:14 PM, Niko Tyni wrote:
> On Mon, Jun 24, 2013 at 01:13:58PM +0200, Jan Kaluža wrote:
>> On 06/23/2013 10:21 PM, Niko Tyni wrote:
>
>>>> # Failed test 1 in t/directive/perlloadmodule3.t at line 38
>
>>> http://svn.apache.org/viewvc/httpd/httpd/trunk/include/httpd.h?r1=959392&r2=959464
>>>
>>> Clearly mod_perl2 needs to somehow map the char to a Perl number. The
>>> test failure happens because the zero byte "\0" is true in Perl and
>>> so the is_virtual method always returns true.
>
>> Try it with attached patch. I haven't tried to run the tests with
>> the patch applied, but from the generated code it looks like it
>> should return int now.
>
> Thanks, but that doesn't quite work here:
> t/directive/perlloadmodule3.t .. 1/3 # Failed test 1 in t/directive/perlloadmodule3.t at line 38
> # Failed test 2 in t/directive/perlloadmodule3.t at line 69
> # Failed test 3 in t/directive/perlloadmodule3.t at line 97
> t/directive/perlloadmodule3.t .. Failed 3/3 subtests
> t/directive/perlloadmodule4.t .. Failed 3/3 subtests
> t/directive/perlloadmodule5.t .. Failed 3/3 subtests
> t/directive/perlloadmodule6.t .. Failed 3/3 subtests
>
> Will look into it properly later.

Hm, I have just tried it and it works for me here (fails without this
patch and works with it). Have you regenerated xs using "make
source_scan" and "make xs_generate"?

Regards,
Jan Kaluza



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: [httpd24] t/directive/perlloadmodule3.t failure [ In reply to ]
On Tue, Jun 25, 2013 at 11:18:52AM +0200, Jan Kaluža wrote:
> On 06/24/2013 11:14 PM, Niko Tyni wrote:
> >On Mon, Jun 24, 2013 at 01:13:58PM +0200, Jan Kaluža wrote:
> >>On 06/23/2013 10:21 PM, Niko Tyni wrote:
> >
> >>>># Failed test 1 in t/directive/perlloadmodule3.t at line 38
> >
> >>> http://svn.apache.org/viewvc/httpd/httpd/trunk/include/httpd.h?r1=959392&r2=959464
> >>>
> >>>Clearly mod_perl2 needs to somehow map the char to a Perl number. The
> >>>test failure happens because the zero byte "\0" is true in Perl and
> >>>so the is_virtual method always returns true.
> >
> >>Try it with attached patch. I haven't tried to run the tests with
> >>the patch applied, but from the generated code it looks like it
> >>should return int now.
> >
> >Thanks, but that doesn't quite work here:

> Hm, I have just tried it and it works for me here (fails without
> this patch and works with it). Have you regenerated xs using "make
> source_scan" and "make xs_generate"?

I thought I had, but obviously something went wrong.

I can confirm it's working for me now. Thanks, and sorry
for being hasty.
--
Niko Tyni ntyni@debian.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: [httpd24] t/directive/perlloadmodule3.t failure [ In reply to ]
On 06/30/2013 10:19 PM, Niko Tyni wrote:
> On Tue, Jun 25, 2013 at 11:18:52AM +0200, Jan Kaluža wrote:
>> On 06/24/2013 11:14 PM, Niko Tyni wrote:
>>> On Mon, Jun 24, 2013 at 01:13:58PM +0200, Jan Kaluža wrote:
>>>> On 06/23/2013 10:21 PM, Niko Tyni wrote:
>>>
>>>>>> # Failed test 1 in t/directive/perlloadmodule3.t at line 38
>>>
>>>>> http://svn.apache.org/viewvc/httpd/httpd/trunk/include/httpd.h?r1=959392&r2=959464
>>>>>
>>>>> Clearly mod_perl2 needs to somehow map the char to a Perl number. The
>>>>> test failure happens because the zero byte "\0" is true in Perl and
>>>>> so the is_virtual method always returns true.
>>>
>>>> Try it with attached patch. I haven't tried to run the tests with
>>>> the patch applied, but from the generated code it looks like it
>>>> should return int now.
>>>
>>> Thanks, but that doesn't quite work here:
>
>> Hm, I have just tried it and it works for me here (fails without
>> this patch and works with it). Have you regenerated xs using "make
>> source_scan" and "make xs_generate"?
>
> I thought I had, but obviously something went wrong.
>
> I can confirm it's working for me now. Thanks, and sorry
> for being hasty.
>

No problem. I have just committed the fix to httpd24 branch.

Thanks for testing.
Jan Kaluza


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org