Skip Menu |

This queue is for tickets about the CSS-Inliner CPAN distribution.

Report information
The Basics
Id: 63982
Status: resolved
Priority: 0/
Queue: CSS-Inliner

People
Owner: Nobody in particular
Requestors: MSTEVENS [...] cpan.org
Cc: michael.smith [...] dianomi.com
michael.stevens [...] dianomi.com
AdminCc:

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



CC: michael.stevens [...] dianomi.com,michael.smith [...] dianomi.com
Subject: tests fail on install
Hi. I tried to install this module, but was unable to do so as it fails tests: PERL_DL_NONLAZY=1 /opt/dianomi/perl/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/acidtest.t t/advanced.t t/advanced_strip.t t/basic.t t/cascade.t t/css_url.t t/custom_html_tree.t t/linktest.t t/ordering.t t/specificity.t t/acidtest.t .......... can't open! # Looks like your test exited with 2 before it could output anything. t/acidtest.t .......... Dubious, test returned 2 (wstat 512, 0x200) Failed 1/1 subtests t/advanced.t .......... ok t/advanced_strip.t .... ok t/basic.t ............. ok t/cascade.t ........... ok t/css_url.t ........... ok t/custom_html_tree.t .. ok t/linktest.t .......... can't open! # Looks like your test exited with 2 before it could output anything. t/linktest.t .......... Dubious, test returned 2 (wstat 512, 0x200) Failed 1/1 subtests t/ordering.t .......... ok t/specificity.t ....... ok The machine is a Redhat EL 5 box. Perl is: Summary of my perl5 (revision 5 version 8 subversion 9) configuration: Platform: osname=linux, osvers=2.6.18-128.7.1.el5, archname=x86_64-linux uname='linux 240738-app1.server2.dianomi.co.uk 2.6.18-128.7.1.el5 #1 smp wed aug 19 04:00:49 edt 2009 x86_64 x86_64 x86_64 gnulinux ' config_args='-des -Dprefix=/opt/dianomi/perl -Accflags=-fPIC' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=define use64bitall=define uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-fPIC -fno-strict-aliasing -pipe - I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O2', cppflags='-fPIC -fno-strict-aliasing -pipe -I/usr/local/include' ccversion='', gccversion='4.1.2 20080704 (Red Hat 4.1.2-44)', gccosandvers='' intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='cc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib /lib64 /usr/lib64 /usr/local/lib64 libs=-lnsl -ldb -ldl -lm -lcrypt -lutil -lc perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc libc=/lib/libc-2.5.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='2.5' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: PERL_MALLOC_WRAP USE_64_BIT_ALL USE_64_BIT_INT USE_FAST_STDIO USE_LARGE_FILES USE_PERLIO Built under linux Compiled at Aug 27 2009 15:45:08 @INC: /opt/dianomi/perl/lib/5.8.9/x86_64-linux /opt/dianomi/perl/lib/5.8.9 /opt/dianomi/perl/lib/site_perl/5.8.9/x86_64-linux /opt/dianomi/perl/lib/site_perl/5.8.9
On Thu Dec 16 07:11:30 2010, MSTEVENS wrote: Show quoted text
> Hi. > > I tried to install this module, but was unable to do so as it fails > tests: > > > PERL_DL_NONLAZY=1 /opt/dianomi/perl/bin/perl "-MExtUtils::Command::MM" > "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/acidtest.t > t/advanced.t t/advanced_strip.t t/basic.t t/cascade.t t/css_url.t > t/custom_html_tree.t t/linktest.t t/ordering.t t/specificity.t > t/acidtest.t .......... can't open! > # Looks like your test exited with 2 before it could output anything. > t/acidtest.t .......... Dubious, test returned 2 (wstat 512, 0x200) > Failed 1/1 subtests > t/advanced.t .......... ok > t/advanced_strip.t .... ok > t/basic.t ............. ok > t/cascade.t ........... ok > t/css_url.t ........... ok > t/custom_html_tree.t .. ok > t/linktest.t .......... can't open! > # Looks like your test exited with 2 before it could output anything. > t/linktest.t .......... Dubious, test returned 2 (wstat 512, 0x200) > Failed 1/1 subtests > t/ordering.t .......... ok > t/specificity.t ....... ok > > The machine is a Redhat EL 5 box. > > Perl is: > > > Summary of my perl5 (revision 5 version 8 subversion 9) configuration: > Platform: > osname=linux, osvers=2.6.18-128.7.1.el5, archname=x86_64-linux > uname='linux 240738-app1.server2.dianomi.co.uk 2.6.18-128.7.1.el5
#1 Show quoted text
> smp wed aug 19 04:00:49 edt 2009 x86_64 x86_64 x86_64 gnulinux ' > config_args='-des -Dprefix=/opt/dianomi/perl -Accflags=-fPIC' > hint=recommended, useposix=true, d_sigaction=define > usethreads=undef use5005threads=undef useithreads=undef > usemultiplicity=undef > useperlio=define d_sfio=undef uselargefiles=define usesocks=undef > use64bitint=define use64bitall=define uselongdouble=undef > usemymalloc=n, bincompat5005=undef > Compiler: > cc='cc', ccflags ='-fPIC -fno-strict-aliasing -pipe - > I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', > optimize='-O2', > cppflags='-fPIC -fno-strict-aliasing -pipe -I/usr/local/include' > ccversion='', gccversion='4.1.2 20080704 (Red Hat 4.1.2-44)', > gccosandvers='' > intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678 > d_longlong=define, longlongsize=8, d_longdbl=define,
longdblsize=16 Show quoted text
> ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', > lseeksize=8 > alignbytes=8, prototype=define > Linker and Libraries: > ld='cc', ldflags =' -L/usr/local/lib' > libpth=/usr/local/lib /lib /usr/lib /lib64 /usr/lib64 > /usr/local/lib64 > libs=-lnsl -ldb -ldl -lm -lcrypt -lutil -lc > perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc > libc=/lib/libc-2.5.so, so=so, useshrplib=false, libperl=libperl.a > gnulibc_version='2.5' > Dynamic Linking: > dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' > cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib' > > > Characteristics of this binary (from libperl): > Compile-time options: PERL_MALLOC_WRAP USE_64_BIT_ALL USE_64_BIT_INT > USE_FAST_STDIO USE_LARGE_FILES USE_PERLIO > Built under linux > Compiled at Aug 27 2009 15:45:08 > @INC: > /opt/dianomi/perl/lib/5.8.9/x86_64-linux > /opt/dianomi/perl/lib/5.8.9 > /opt/dianomi/perl/lib/site_perl/5.8.9/x86_64-linux > /opt/dianomi/perl/lib/site_perl/5.8.9
Further detail: root@server2 CSS-Inliner-2897-LFgGbt]# perl -Iblib/lib t/acidtest.t 1..1 can't open! # Looks like your test exited with 2 before it could output anything. [root@server2 CSS-Inliner-2897-LFgGbt]#
Fixed in my git repo at: http://gitorious.org/css-inliner/css-inliner Bug seems to apply to incorrect test directory detection for users with "t" in name. Attached patches to fix bug and improve test error reporting.
Subject: 0002-Improve-error-reporting.patch
From 875bf40bd16ae636579feeea20fd999e3fa2bbda Mon Sep 17 00:00:00 2001 From: Michael Stevens <mstevens@etla.org> Date: Fri, 17 Dec 2010 10:45:04 +0000 Subject: [PATCH 2/4] Improve error reporting. --- t/linktest.t | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/t/linktest.t b/t/linktest.t index b265d3c..34f9aad 100644 --- a/t/linktest.t +++ b/t/linktest.t @@ -12,10 +12,10 @@ my $html_path = (getcwd =~ m/t/) ? getcwd . '/html/' : getcwd . '/t/html/'; my $test_file = $html_path . 'linktest.html'; my $result_file = $html_path . 'linktest_result.html'; -open( my $fh, $test_file ) or die "can't open!\n"; +open( my $fh, $test_file ) or die "can't open $test_file: $!!\n"; my $html = do { local( $/ ) ; <$fh> } ; -open( my $fh2, $result_file ) or die "can't open!\n"; +open( my $fh2, $result_file ) or die "can't open $test_file: $!!\n"; my $correct_result = do { local( $/ ) ; <$fh2> } ; my $inliner = CSS::Inliner->new(); -- 1.7.3.1
Subject: 0004-Fix-for-directories-with-t-in-path.patch
From 7be08ec3c312373fe9d229825f72df53f97a1671 Mon Sep 17 00:00:00 2001 From: Michael Stevens <mstevens@etla.org> Date: Fri, 17 Dec 2010 10:45:52 +0000 Subject: [PATCH 4/4] Fix for directories with "t" in path. --- t/linktest.t | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/t/linktest.t b/t/linktest.t index 34f9aad..176b726 100644 --- a/t/linktest.t +++ b/t/linktest.t @@ -8,7 +8,7 @@ use CSS::Inliner; plan(tests => 1); -my $html_path = (getcwd =~ m/t/) ? getcwd . '/html/' : getcwd . '/t/html/'; +my $html_path = (getcwd =~ m/t$/) ? getcwd . '/html/' : getcwd . '/t/html/'; my $test_file = $html_path . 'linktest.html'; my $result_file = $html_path . 'linktest_result.html'; -- 1.7.3.1
Subject: 0003-Fix-for-running-on-directories-with-t-in-path.patch
From 5b53002a622e124a5a42e1e18a40410fad321790 Mon Sep 17 00:00:00 2001 From: Michael Stevens <mstevens@etla.org> Date: Fri, 17 Dec 2010 10:45:13 +0000 Subject: [PATCH 3/4] Fix for running on directories with "t" in path. --- t/acidtest.t | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/t/acidtest.t b/t/acidtest.t index 5f0ba13..0df29cc 100644 --- a/t/acidtest.t +++ b/t/acidtest.t @@ -8,7 +8,7 @@ use CSS::Inliner; plan(tests => 1); -my $html_path = (getcwd =~ m/t/) ? getcwd . '/html/' : getcwd . '/t/html/'; +my $html_path = (getcwd =~ m/t$/) ? getcwd . '/html/' : getcwd . '/t/html/'; my $test_file = $html_path . 'acidtest.html'; my $result_file = $html_path . 'acidtest_result.html'; -- 1.7.3.1
Subject: 0001-Improve-error-reporting-in-tests.patch
From a452933dd0c7dfe2f8b2e5a07a99773d2dc12bd1 Mon Sep 17 00:00:00 2001 From: Michael Stevens <mstevens@etla.org> Date: Fri, 17 Dec 2010 10:42:15 +0000 Subject: [PATCH 1/4] Improve error reporting in tests. --- t/acidtest.t | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/t/acidtest.t b/t/acidtest.t index 37cbf27..5f0ba13 100644 --- a/t/acidtest.t +++ b/t/acidtest.t @@ -12,10 +12,10 @@ my $html_path = (getcwd =~ m/t/) ? getcwd . '/html/' : getcwd . '/t/html/'; my $test_file = $html_path . 'acidtest.html'; my $result_file = $html_path . 'acidtest_result.html'; -open( my $fh, $test_file ) or die "can't open!\n"; +open( my $fh, $test_file ) or die "can't open $test_file: $!!\n"; my $html = do { local( $/ ) ; <$fh> } ; -open( my $fh2, $result_file ) or die "can't open!\n"; +open( my $fh2, $result_file ) or die "can't open $result_file: $!!\n"; my $correct_result = do { local( $/ ) ; <$fh2> } ; my $inliner = CSS::Inliner->new(); -- 1.7.3.1
Hi Michael, Wow - that is just... terrible. As you can tell I definitely need a lot more help with testing! Thanks for the fixes, hope the lib is working out for you. You should see a new versions shortly that includes your fixes. -Kevin ============= Committed revision 2954.
Can you do me a small favour and let me know when you release the updated version?
Sure. Right now I'm waiting until the New Year to give me time to wrap up some things with Inliner. On Thu Dec 23 05:54:33 2010, MSTEVENS wrote: Show quoted text
> Can you do me a small favour and let me know when you release the updated > version?
On Thu Dec 30 17:48:27 2010, KAMELKEV wrote: Show quoted text
> Sure. Right now I'm waiting until the New Year to give me time to wrap > up some things with Inliner. > > On Thu Dec 23 05:54:33 2010, MSTEVENS wrote:
> > Can you do me a small favour and let me know when you release the
updated Show quoted text
> > version?
>
Have you had a chance to do the release?
I... have not had time. Fail at life. We're tracing a fairly substantial problem in the underlying storage mechanism which is non-trivial to fix. Basically the underlying mechanism for storage (also one of my modules) CSS::Simple is a very basic key-based mechanism for storing css rulesets. What I failed to recognize earlier on was the possibility for people to redeclare css rules. For example: key1 {rule a} key2 {rule b} key1 {rule c} In the above case an inlined result with the current code can possibly produce the wrong output. What it means is that I will have to come up with a new way of storing data that can store not only keys, but explicit ordering for all keys - even duplicates. I have found no convenient data structure to do this, and my hacks to get it working are just that - hacks. Probably the best thing for me to do is include a test to expose the problem and hope that one of the many people using this tool can get back to me with a possible solution. Sorry again for the delay - it's a standard case of cost/benefit. I kept thinking I would find a solution, and I spent that time digging instead of snapping again. I've got a post it on my monitor right here :( -K On Sat Feb 19 16:13:24 2011, MSTEVENS wrote: Show quoted text
> On Thu Dec 30 17:48:27 2010, KAMELKEV wrote:
> > Sure. Right now I'm waiting until the New Year to give me time to wrap > > up some things with Inliner. > > > > On Thu Dec 23 05:54:33 2010, MSTEVENS wrote:
> > > Can you do me a small favour and let me know when you release the
> updated
> > > version?
> >
> > Have you had a chance to do the release?
Thanks for the update. We still find it a great module and look forward to your fix :)
Ok posted! You should see it soon. Please file if you notice additional problems. On Fri Mar 04 05:15:57 2011, MSTEVENS wrote: Show quoted text
> Thanks for the update. > > We still find it a great module and look forward to your fix :)
CC: MSTEVENS [...] cpan.org, michael.smith [...] dianomi.com
Subject: Re: [rt.cpan.org #63982] tests fail on install
Date: Fri, 11 Mar 2011 11:28:56 +0000
To: bug-CSS-Inliner [...] rt.cpan.org
From: Michael Stevens <michael.stevens [...] dianomi.com>
Thanks, we'll give it a try. On 10 March 2011 01:04, Kevin Hatim Kamel via RT < bug-CSS-Inliner@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=63982 > > > Ok posted! You should see it soon. > > Please file if you notice additional problems. > > > On Fri Mar 04 05:15:57 2011, MSTEVENS wrote:
> > Thanks for the update. > > > > We still find it a great module and look forward to your fix :)
> > >
-- Michael Stevens Dianomi Ltd 18 Buckingham Gate London SW1E 6LB Tel: 020 7802 5530 Fax: 020 7630 7356 www.dianomi.com The information in this message and any attachment is intended for the addressee and is confidential and may be subject to legal privilege. Dianomi Ltd, Registered Office: One America Square, Crosswall, London. EC3N 2SG. Registered in England and Wales with Company Registration Number 4513809. VAT registration number: 809754988