Skip Menu |

This queue is for tickets about the URI-Escape-XS CPAN distribution.

Report information
The Basics
Id: 39135
Status: resolved
Priority: 0/
Queue: URI-Escape-XS

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.02
Fixed in: (no value)



Subject: Test failures (03-hashu.t)
I see that the 03-hashu.t test is failing on a number of platforms and perl versions. I tried to investigate this failure, but eventually gave up --- essentially just trying to look into the failure (e.g. with the perl debugger) made the error go away. Below is an example --- it is just sufficient to add a environment variable or add some make variables to cease the error. Also, if I run the test_harness command outside of make, there's again no error anymore. Or using GNU make instead of BSD make (system here is FreeBSD 6.1). Note that there are other perl versions on my system which never show test errors, regardless of the make used. Regards, Slaven $ make test PERL_DL_NONLAZY=1 /usr/perl5.8.8@34313/bin/perl5.8.8 "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/00-load.........1/1 # Testing URI::Escape::XS 0.02, Perl 5.008008, /usr/perl5.8.8@34313/bin/perl5.8.8 t/00-load.........ok t/01-compat.......ok t/02-basic........ok t/03-hashu........1/6 # Failed test 'decodeURI("%uDEB2")' # at t/03-hashu.t line 30. # got: '' # expected: '' # Failed test 'lo surrogate is missing for U+D869 at t/03-hashu.t line 28. # ' # at t/03-hashu.t line 31. # 'lo surrogate is missing for U+D869 at t/03-hashu.t line 28. # ' # doesn't match '(?-xism:invalid surrogate hi)' # Looks like you failed 2 tests of 6. t/03-hashu........ Dubious, test returned 2 (wstat 512, 0x200) Failed 2/6 subtests t/boilerplate.....ok t/pod-coverage....ok t/pod.............ok Test Summary Report ------------------- t/03-hashu (Wstat: 512 Tests: 6 Failed: 2) Failed tests: 5-6 Non-zero exit status: 2 Files=7, Tests=531, 1 wallclock secs ( 0.08 usr 0.04 sys + 0.38 cusr 0.05 csys = 0.55 CPU) Result: FAIL Failed 1/7 test programs. 2/531 subtests failed. *** Error code 255 Stop in /var/tmp/CPAN-build/URI-Escape-XS-0.02-9VG41Y. ====================================================================== $ env A=B make test PERL_DL_NONLAZY=1 /usr/perl5.8.8@34313/bin/perl5.8.8 "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/00-load.........1/1 # Testing URI::Escape::XS 0.02, Perl 5.008008, /usr/perl5.8.8@34313/bin/perl5.8.8 t/00-load.........ok t/01-compat.......ok t/02-basic........ok t/03-hashu........ok t/boilerplate.....ok t/pod-coverage....ok t/pod.............ok All tests successful. Files=7, Tests=531, 1 wallclock secs ( 0.09 usr 0.02 sys + 0.40 cusr 0.04 csys = 0.55 CPU) Result: PASS
Thanks, fixed in 0.03. It was just a matter of null termination. Sigh. Dan the Maintainer Thereof diff -u -r0.2 XS.xs --- XS.xs 2008/05/30 23:53:13 0.2 +++ XS.xs 2009/01/16 06:38:55 @@ -1,5 +1,5 @@ /* - * $Id: XS.xs,v 0.2 2008/05/30 23:53:13 dankogai Exp $ + * $Id: XS.xs,v 0.3 2009/01/16 06:38:52 dankogai Exp dankogai $ */ #include "EXTERN.h" @@ -83,6 +83,7 @@ && isxdigit(src[i+2]) && isxdigit(src[i+3]) && isxdigit(src[i+4]) && isxdigit(src[i+5])){ strncpy((char *)buf, (char *)(src + i + 2), 4); + buf[4] = '\0'; /* RT#39135 */ hi = strtol((char *)buf, NULL, 16); i += 5; if (hi < 0xD800 || 0xDFFF < hi){ On Tue Sep 09 16:48:21 2008, SREZIC wrote: Show quoted text
> I see that the 03-hashu.t test is failing on a number of platforms and > perl versions. I tried to investigate this failure, but eventually gave > up --- essentially just trying to look into the failure (e.g. with the > perl debugger) made the error go away. > > Below is an example --- it is just sufficient to add a environment > variable or add some make variables to cease the error. Also, if I run > the test_harness command outside of make, there's again no error > anymore. Or using GNU make instead of BSD make (system here is FreeBSD > 6.1). Note that there are other perl versions on my system which never > show test errors, regardless of the make used. > > Regards, > Slaven > > > $ make test > PERL_DL_NONLAZY=1 /usr/perl5.8.8@34313/bin/perl5.8.8 > "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', > 'blib/arch')" t/*.t > t/00-load.........1/1 # Testing URI::Escape::XS 0.02, Perl 5.008008, > /usr/perl5.8.8@34313/bin/perl5.8.8 > t/00-load.........ok > t/01-compat.......ok > t/02-basic........ok > t/03-hashu........1/6 > # Failed test 'decodeURI("%uDEB2")' > # at t/03-hashu.t line 30. > # got: '' > # expected: '' > > # Failed test 'lo surrogate is missing for U+D869 at t/03-hashu.t line 28. > # ' > # at t/03-hashu.t line 31. > # 'lo surrogate is missing for U+D869 at t/03-hashu.t > line 28. > # ' > # doesn't match '(?-xism:invalid surrogate hi)' > # Looks like you failed 2 tests of 6. > t/03-hashu........ Dubious, test returned 2 (wstat 512, 0x200) > Failed 2/6 subtests > t/boilerplate.....ok > t/pod-coverage....ok > t/pod.............ok > > Test Summary Report > ------------------- > t/03-hashu (Wstat: 512 Tests: 6 Failed: 2) > Failed tests: 5-6 > Non-zero exit status: 2 > Files=7, Tests=531, 1 wallclock secs ( 0.08 usr 0.04 sys + 0.38 cusr > 0.05 csys = 0.55 CPU) > Result: FAIL > Failed 1/7 test programs. 2/531 subtests failed. > *** Error code 255 > > Stop in /var/tmp/CPAN-build/URI-Escape-XS-0.02-9VG41Y. > >
========================================================= ============= Show quoted text
> > $ env A=B make test > PERL_DL_NONLAZY=1 /usr/perl5.8.8@34313/bin/perl5.8.8 > "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', > 'blib/arch')" t/*.t > t/00-load.........1/1 # Testing URI::Escape::XS 0.02, Perl 5.008008, > /usr/perl5.8.8@34313/bin/perl5.8.8 > t/00-load.........ok > t/01-compat.......ok > t/02-basic........ok > t/03-hashu........ok > t/boilerplate.....ok > t/pod-coverage....ok > t/pod.............ok > All tests successful. > Files=7, Tests=531, 1 wallclock secs ( 0.09 usr 0.02 sys + 0.40 cusr > 0.04 csys = 0.55 CPU) > Result: PASS