Skip Menu |

This queue is for tickets about the Text-CSV_XS CPAN distribution.

Report information
The Basics
Id: 81239
Status: resolved
Priority: 0/
Queue: Text-CSV_XS

People
Owner: Nobody in particular
Requestors: kdevel [...] vogtner.de
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.92
Fixed in: 0.94



Subject: 0.92 Failed test 'Data 54/1 (1037)' at t/70_rt.t line 434
Date: Fri, 16 Nov 2012 20:24:34 +0100
To: bug-Text-CSV_XS [...] rt.cpan.org
From: kdevel [...] vogtner.de
t/65_allow.t ...... ok "\x{00d1}" does not map to utf8 at .../i686-linux/IO/Handle.pm line 399. "\x{0080}" does not map to utf8 at t/70_rt.t line 426. # Failed test 'Data 54/1 (1037)' # at t/70_rt.t line 434. # got: '1,"aÐ~UкОМбÑ~CÑ~@гâ~D~VÐ~UкОМбÑ~CÑ~@гâ~D~VÐ~UкОМбÑ~CÑ~@гâ~D~VÐ~UкОМбÑ~CÑ~@гâ~D~VÐ~UкОМбÑ~CÑ~@гâ~D~VÐ ~UкОМбÑ~CÑ~@гâ~D~VÐ~UкОМбÑ~CÑ~@гâ~D~VÐ~UкОМбÑ~CÑ~@гâ~D~VÐ~UкОМбÑ~CÑ~@гâ~D~VÐ~UкОМбÑ~CÑ~@гâ~D~VÐ~UкОМбÑ~CÑ~@гâ~D~ VÐ~UкОМбÑ~CÑ~@гâ~D~VÐ~U... # Looks like you planned 20449 tests but ran 663. # Looks like you failed 1 test of 663 run. t/70_rt.t ......... Dubious, test returned 1 (wstat 256, 0x100) Failed 19787/20449 subtests t/75_hashref.t .... ok Is this a regression from Bug #80680? Regards Stefan
Subject: Re: [rt.cpan.org #81239] 0.92 Failed test 'Data 54/1 (1037)' at t/70_rt.t line 434
Date: Sat, 17 Nov 2012 10:07:09 +0100
To: bug-Text-CSV_XS [...] rt.cpan.org
From: "H.Merijn Brand" <h.m.brand [...] xs4all.nl>
On Fri, 16 Nov 2012 14:24:46 -0500, "kdevel via RT" <bug-Text-CSV_XS@rt.cpan.org> wrote: Show quoted text
> t/65_allow.t ...... ok > "\x{00d1}" does not map to utf8 at .../i686-linux/IO/Handle.pm line 399. > "\x{0080}" does not map to utf8 at t/70_rt.t line 426. > > # Failed test 'Data 54/1 (1037)' > # at t/70_rt.t line 434. > # got: > '1,"aÐ~UкОМбÑ~CÑ~@гâ~D~VÐ~UкОМбÑ~CÑ~@гâ~D~VÐ~UкОМбÑ~CÑ~@гâ~D~VÐ~UкОМбÑ~CÑ~@гâ~D~VÐ~UкОМбÑ~CÑ~@гâ~D~VÐ > ~UкОМбÑ~CÑ~@гâ~D~VÐ~UкОМбÑ~CÑ~@гâ~D~VÐ~UкОМбÑ~CÑ~@гâ~D~VÐ~UкОМбÑ~CÑ~@гâ~D~VÐ~UкОМбÑ~CÑ~@гâ~D~VÐ~UкОМбÑ~CÑ~@гâ~D~ > VÐ~UкОМбÑ~CÑ~@гâ~D~VÐ~U... > > # Looks like you planned 20449 tests but ran 663. > # Looks like you failed 1 test of 663 run. > t/70_rt.t ......... > Dubious, test returned 1 (wstat 256, 0x100) > Failed 19787/20449 subtests > t/75_hashref.t .... ok > > Is this a regression from Bug #80680?
Could be, but the only fail report on CPANtesters is http://www.cpantesters.org/cpan/report/94de49e0-2202-11e2-9748-a5b2ab18a778 where http://matrix.cpantesters.org/?dist=Text-CSV_XS is all green. That fail report is done with asan and might well be related to perl itself instead of Text::CSV_XS. I have not used clang enough to see exactly what this means. I tested this release on over a 100 versions of perl on different architectures (Linux-i686, Linux-x64, HP-UX-PA2, HP-UX-IA64, AIX-P5, Windows7/64 Strawberry) and all passed. I have no access to MacOSX and have no indication that this release should fail anywhere, so I need (a lot) more information here to see what might be failing where What OS, What perl version, what architecture, what $LANG, what $LC_ALL -- H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/ using perl5.00307 .. 5.17 porting perl5 on HP-UX, AIX, and openSUSE http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/ http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/
Subject: Re: [rt.cpan.org #81239] 0.92 Failed test 'Data 54/1 (1037)' at t/70_rt.t line 434
Date: Sat, 17 Nov 2012 18:09:43 +0100
To: bug-Text-CSV_XS [...] rt.cpan.org
From: kdevel [...] vogtner.de
Show quoted text
> What OS, What perl version, what architecture, what $LANG, what $LC_ALL
Linux, 5.8.4, i686, LANG=de_DE@euro, LC_ALL is not set but LC_COLLATE=POSIX. Neither the plain nor a security patched version of 5.8.4 reproduces the failure of test 70. Probably some other module which is installed after perl and before Text-CSV_XS causes the test to fail.
Subject: Re: [rt.cpan.org #81239] 0.92 Failed test 'Data 54/1 (1037)' at t/70_rt.t line 434
Date: Sat, 17 Nov 2012 23:14:18 +0100
To: bug-Text-CSV_XS [...] rt.cpan.org
From: kdevel [...] vogtner.de
http://grokbase.com/t/perl/perl5-changes/0586e7mgwd (Change 25271) which is in perl since 5.8.8 contains the solution to the problem: -our $fallback = Encode::PERLQQ()|Encode::WARN_ON_ERR(); +our $fallback = + Encode::PERLQQ()|Encode::WARN_ON_ERR()|Encode::STOP_AT_PARTIAL();
Subject: Re: [rt.cpan.org #81239] 0.92 Failed test 'Data 54/1 (1037)' at t/70_rt.t line 434
Date: Mon, 19 Nov 2012 07:55:34 +0100
To: bug-Text-CSV_XS [...] rt.cpan.org
From: "H.Merijn Brand" <h.m.brand [...] xs4all.nl>
On Sat, 17 Nov 2012 17:14:31 -0500, "kdevel via RT" <bug-Text-CSV_XS@rt.cpan.org> wrote: Show quoted text
> Queue: Text-CSV_XS > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=81239 > > > http://grokbase.com/t/perl/perl5-changes/0586e7mgwd (Change 25271) which > is in perl since 5.8.8 contains the solution to the problem: > > -our $fallback = Encode::PERLQQ()|Encode::WARN_ON_ERR(); > +our $fallback = > + Encode::PERLQQ()|Encode::WARN_ON_ERR()|Encode::STOP_AT_PARTIAL();
So the proper "fix" would be this? diff --git a/t/70_rt.t b/t/70_rt.t index 6290dce..78c83f1 100644 --- a/t/70_rt.t +++ b/t/70_rt.t @@ -408,7 +408,8 @@ SKIP: { # http://rt.cpan.org/Ticket/Display.html?id=74220 } SKIP: { # http://rt.cpan.org/Ticket/Display.html?id=80680 - $] < 5.008002 and skip "UTF8 unreliable in perl $]", 7; + $] < 5.008002 and skip "UTF8 unreliable in perl $]", 20000; + $Encode::VERSION < 2.11 and skip "Encode is too old for these tests", 20000; $rt = "80680"; # Text::CSV_XS produces garbage on some data -- H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/ using perl5.00307 .. 5.17 porting perl5 on HP-UX, AIX, and openSUSE http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/ http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/
Subject: Re: [rt.cpan.org #81239] 0.92 Failed test 'Data 54/1 (1037)' at t/70_rt.t line 434
Date: Mon, 19 Nov 2012 10:02:27 +0100
To: bug-Text-CSV_XS [...] rt.cpan.org
From: kdevel [...] vogtner.de
h.m.brand@xs4all.nl via RT schrieb: Show quoted text
> So the proper "fix" would be this?
It's the Encode 2.x module which triggers the failure. Some results: perl 5.8.4: OK perl 5.8.4 + Encode {2.12, 2.20, 2.46 or 2.47}: FAIL perl 5.8.7 (includes Encode 2.10): FAIL perl 5.8.8 (includes Encode 2.12): OK perl 5.8.8 + Encode 2.47: OK perl 5.8.9 + Encode 2.47: OK
Subject: Re: [rt.cpan.org #81239] 0.92 Failed test 'Data 54/1 (1037)' at t/70_rt.t line 434
Date: Mon, 19 Nov 2012 10:19:55 +0100
To: bug-Text-CSV_XS [...] rt.cpan.org
From: "H.Merijn Brand" <h.m.brand [...] xs4all.nl>
On Mon, 19 Nov 2012 04:02:48 -0500, "kdevel via RT" <bug-Text-CSV_XS@rt.cpan.org> wrote: Show quoted text
> Queue: Text-CSV_XS > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=81239 > > > h.m.brand@xs4all.nl via RT schrieb:
> > So the proper "fix" would be this?
> > It's the Encode 2.x module which triggers the failure. Some results: > > perl 5.8.4: OK > perl 5.8.4 + Encode {2.12, 2.20, 2.46 or 2.47}: FAIL > perl 5.8.7 (includes Encode 2.10): FAIL > perl 5.8.8 (includes Encode 2.12): OK > perl 5.8.8 + Encode 2.47: OK > perl 5.8.9 + Encode 2.47: OK
replacing < 2.11 with < 2.47 would do the trick? -- H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/ using perl5.00307 .. 5.17 porting perl5 on HP-UX, AIX, and openSUSE http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/ http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/
Subject: Re: [rt.cpan.org #81239] 0.92 Failed test 'Data 54/1 (1037)' at t/70_rt.t line 434
Date: Mon, 19 Nov 2012 11:15:31 +0100
To: bug-Text-CSV_XS [...] rt.cpan.org
From: kdevel [...] vogtner.de
Show quoted text
> replacing < 2.11 with < 2.47 would do the trick?
I would not mandate any code change in Text-CSV_XS. The failure which make test unveils should be handled in the Encode module by not allowing an installation on perl < 5.8.8. In no case shall make test skip a test which otherwise would fail.
Subject: Re: [rt.cpan.org #81239] 0.92 Failed test 'Data 54/1 (1037)' at t/70_rt.t line 434
Date: Mon, 19 Nov 2012 13:16:24 +0100
To: bug-Text-CSV_XS [...] rt.cpan.org
From: "H.Merijn Brand" <h.m.brand [...] xs4all.nl>
On Mon, 19 Nov 2012 05:15:49 -0500, "kdevel via RT" <bug-Text-CSV_XS@rt.cpan.org> wrote: Show quoted text
> Queue: Text-CSV_XS > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=81239 > >
> > replacing < 2.11 with < 2.47 would do the trick?
> > I would not mandate any code change in Text-CSV_XS. The failure which > make test unveils should be handled in the Encode module by not allowing > an installation on perl < 5.8.8. > > In no case shall make test skip a test which otherwise would fail.
I do not agree. These are new tests that do not fix a regression, but a bug that entered the code by design. Bad me. Upgrading Encode to a more recent version is quite possible on older perls. I just installed 2.47 on every perl from 5.8.0 up without a problem. I'll add a recommendation to Encode 2.47 in the META stuff, and skip the tests on all older versions. The tests are meant to test *my* code, not to test modules that might use in production code. I just needed Encode to *test* my fix. My fix works fine on older perl versions with older Encode if the use of Encode is not required. -- H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/ using perl5.00307 .. 5.17 porting perl5 on HP-UX, AIX, and openSUSE http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/ http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/
Subject: Re: [rt.cpan.org #81239] 0.92 Failed test 'Data 54/1 (1037)' at t/70_rt.t line 434
Date: Tue, 20 Nov 2012 17:52:13 +0100
To: bug-Text-CSV_XS [...] rt.cpan.org
From: kdevel [...] vogtner.de
Show quoted text
>> > replacing < 2.11 with < 2.47 would do the trick?
It seems that replacing open my $fh, ">:encoding(utf-8)", \$out; by open my $fh, ">:utf8", \$out; in 70_rt.t does the trick. Show quoted text
> I'll add a recommendation to Encode 2.47 in the META stuff, and skip > the tests on all older versions. The tests are meant to test *my* code, > not to test modules that might use in production code.
All the code in 70_rt.t is *your* code. The aim of "make test" is to ensure that the system executes all test code without error. This is not the case if perl < 5.8.8 + Encode > 2 is running underneath your module (this is of course not your fault). Show quoted text
> I just needed Encode to *test* my fix.
There's nothing wrong if a broken system says "I'm broken." perl < 5.8.8 + Encode > 2 *is* broken.
Subject: Re: [rt.cpan.org #81239] 0.92 Failed test 'Data 54/1 (1037)' at t/70_rt.t line 434
Date: Tue, 20 Nov 2012 18:09:44 +0100
To: bug-Text-CSV_XS [...] rt.cpan.org
From: "H.Merijn Brand" <h.m.brand [...] xs4all.nl>
On Tue, 20 Nov 2012 11:52:29 -0500, "kdevel via RT" <bug-Text-CSV_XS@rt.cpan.org> wrote: Show quoted text
> >> > replacing < 2.11 with < 2.47 would do the trick?
> > It seems that replacing > > open my $fh, ">:encoding(utf-8)", \$out; > > by > > open my $fh, ">:utf8", \$out;
I was told not/never to use that, as it isn't safe Show quoted text
> in 70_rt.t does the trick. >
> > I'll add a recommendation to Encode 2.47 in the META stuff, and skip > > the tests on all older versions. The tests are meant to test *my* code, > > not to test modules that might use in production code.
> > All the code in 70_rt.t is *your* code. The aim of "make test" is to > ensure that the system executes all test code without error.
The aim of the tests we are talking about, is to test that the generated CSV is valid. The problem here is like the way to generate a valid sting to test against that isn't flawless: that still does not mean that the generated code is not correct. The user of my module might not even use the generated data him/herself but just send it somewhere else. In that case my part of the deal is correct. Show quoted text
> This is not the case if perl < 5.8.8 + Encode > 2 is running
It still is. The test actually doesn't care if the generated code can be read, it is just that there is no other way to check if the generated CSV is valid. If there was, I would not even need Encode Show quoted text
> underneath your module (this is of course not your fault). >
> > I just needed Encode to *test* my fix.
> > There's nothing wrong if a broken system says "I'm broken." perl < 5.8.8 > + Encode > 2 *is* broken.
I tested with 2.47 and saw no problems on 5.8.x lower than 8 -- H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/ using perl5.00307 .. 5.17 porting perl5 on HP-UX, AIX, and openSUSE http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/ http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/
Subject: Re: [rt.cpan.org #81239] 0.92 Failed test 'Data 54/1 (1037)' at t/70_rt.t line 434
Date: Tue, 20 Nov 2012 19:38:37 +0100
To: bug-Text-CSV_XS [...] rt.cpan.org
From: kdevel [...] vogtner.de
Show quoted text
>> open my $fh, ">:utf8", \$out;
> > I was told not/never to use that, as it isn't safe
What's unsafe with it? http://perldoc.perl.org/PerlIO.html says: "Note that this layer does not validate byte sequences. For *reading* input, using :encoding(utf8) instead of bare :utf8 is strongly recommended." In 70_rt.t you are *writing*. Show quoted text
>> There's nothing wrong if a broken system says "I'm broken." perl < 5.8.8 >> + Encode > 2 *is* broken.
> > I tested with 2.47 and saw no problems on 5.8.x lower than 8
Some combinations are broken not all, I get these results when running Text-CSV_XS-0.92's make test: perl 5.8.4 (includes Encode 1.99_01) PASS perl 5.8.4 + Encode 2.12, 2.20, 2.46 or 2.47 . . . . . . . . . . . . . FAIL perl 5.8.5 (includes Encode 2.1). . . PASS perl 5.8.5 + Encode 2.47. . . . . . . FAIL perl 5.8.6 (includes Encode 2.8). . . PASS perl 5.8.6 + Encode 2.47. . . . . . . FAIL perl 5.8.7 (includes Encode 2.10) . . FAIL perl 5.8.7 + Encode 2.47. . . . . . . FAIL perl 5.8.8 (includes Encode 2.12) . . PASS perl 5.8.8 + Encode 2.47. . . . . . . PASS