Skip Menu |

This queue is for tickets about the XML-LibXML CPAN distribution.

Report information
The Basics
Id: 86665
Status: resolved
Priority: 0/
Queue: XML-LibXML

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

Bug Information
Severity: Normal
Broken in: 2.0019
Fixed in: (no value)



Subject: Test broken by spaces in directory names
If the build directory (or any of its ancestors) has a space in its name, make test fails with a misleading error message: t/49callbacks_returning_undef.t ...... file:///etc/xml/catalog:1: parser error : Document is empty ^ file:///etc/xml/catalog:1: parser error : Start tag expected, '<' not found ^ # Looks like your test exited with 255 before it could output anything. t/49callbacks_returning_undef.t ...... Dubious, test returned 255 (wstat 65280, 0xff00) Failed 1/1 subtests
On Wed Jul 03 09:58:11 2013, BLGL wrote: Show quoted text
> If the build directory (or any of its ancestors) has a space in its > name, > make test fails with a misleading error message: > > t/49callbacks_returning_undef.t ...... file:///etc/xml/catalog:1: > parser error : Document is empty > > ^ > file:///etc/xml/catalog:1: parser error : Start tag expected, '<' not > found > > ^ > # Looks like your test exited with 255 before it could output > anything. > t/49callbacks_returning_undef.t ...... Dubious, test returned 255 > (wstat 65280, 0xff00) > Failed 1/1 subtests
Hi! In some cases, the first call callbacks occur when reading the catalog "/etc/xml/catalog" - this case, the test will fail. I propose to correct this test. -- YOREEK
Subject: 86665.patch
diff -Nura XML-LibXML-2.0102-orig/t/49callbacks_returning_undef.t XML-LibXML-2.0102/t/49callbacks_returning_undef.t --- XML-LibXML-2.0102-orig/t/49callbacks_returning_undef.t 2012-08-09 10:24:16.000000000 +0300 +++ XML-LibXML-2.0102/t/49callbacks_returning_undef.t 2013-08-19 18:49:43.321605591 +0300 @@ -71,7 +71,12 @@ my $match_ret = 1; $icb->register_callbacks( [ - sub { my $to_ret = $match_ret; $match_ret = 0; return $to_ret; }, + sub { + my $uri = shift; + # skip for XML catalogs in /etc/xml/ + return 0 if $uri =~ m{^file:///etc/xml/}; + my $to_ret = $match_ret; $match_ret = 0; return $to_ret; + }, sub { return undef; }, undef, undef
Hi Yuriy, On Mon Aug 19 12:02:29 2013, yoreek wrote: Show quoted text
> On Wed Jul 03 09:58:11 2013, BLGL wrote:
> > If the build directory (or any of its ancestors) has a space in its > > name, > > make test fails with a misleading error message: > > > > t/49callbacks_returning_undef.t ...... file:///etc/xml/catalog:1: > > parser error : Document is empty > > > > ^ > > file:///etc/xml/catalog:1: parser error : Start tag expected, '<' not > > found > > > > ^ > > # Looks like your test exited with 255 before it could output > > anything. > > t/49callbacks_returning_undef.t ...... Dubious, test returned 255 > > (wstat 65280, 0xff00) > > Failed 1/1 subtests
> > Hi! > > In some cases, the first call callbacks occur when reading the catalog > "/etc/xml/catalog" - this case, the test will fail. > I propose to correct this test.
Thanks for the patch. It makes the tests succeed as long as the XML_CATALOG_FILES environment variable is empty (if it's not - it still fails). I applied it now with a nullification of XML_CATALOG_FILES there for good measure, and it is fixed in XML-LibXML-2.0104 - thanks for the report and fix. Regards, -- Shlomi Fish