Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warnings from cpan/IO-Compress/t/cz-03zlib-v1.t #11960

Closed
p5pRT opened this issue Feb 14, 2012 · 19 comments
Closed

warnings from cpan/IO-Compress/t/cz-03zlib-v1.t #11960

p5pRT opened this issue Feb 14, 2012 · 19 comments

Comments

@p5pRT
Copy link

p5pRT commented Feb 14, 2012

Migrated from rt.perl.org#110736 (status was 'resolved')

Searchable as RT110736$

@p5pRT
Copy link
Author

p5pRT commented Feb 14, 2012

From @nwc10

I'm seeing this in blead​:

../cpan/IO-Compress/t/cz-03zlib-v1.t .............................. 1/464 Argument "xM-^\" isn't numeric in numeric eq (==) at (eval in cmp_ok) t/cz-03zlib-v1.t line 1244.
Argument "M-sTHM-LUHTM-ppM-tQM-0400PHM-NM-O-(-I-^B\0OM-^V^G&" isn't numeric in numeric eq (==) at (eval in cmp_ok) t/cz-03zlib-v1.t line 1246.
Argument "" isn't numeric in numeric eq (==) at (eval in cmp_ok) t/cz-03zlib-v1.t line 1248.

I'm not seeing this if I build the same version of IO-Compress against
perl 5.12.0, perl 5.14.0 or perl 5.14.2.

perl 5.14.2 has the same version of Test​::More as blead.

Hence I'm rather at a loss as to what the underlying cause is, and whether
it's a symptom of a real problem.

Even if it's cosmetic, I think we should fix it before perl 5.16.0 ships.

Nicholas Clark

@p5pRT
Copy link
Author

p5pRT commented Feb 17, 2012

From @jkeenan

On Tue Feb 14 10​:38​:58 2012, nicholas wrote​:

I'm seeing this in blead​:

../cpan/IO-Compress/t/cz-03zlib-v1.t ..............................
1/464 Argument "xM-^\" isn't numeric in numeric eq (==) at (eval in
cmp_ok) t/cz-03zlib-v1.t line 1244.
Argument "M-sTHM-LUHTM-ppM-tQM-0400PHM-NM-O-(-I-^B\0OM-^V^G&" isn't
numeric in numeric eq (==) at (eval in cmp_ok) t/cz-03zlib-v1.t line
1246.
Argument "" isn't numeric in numeric eq (==) at (eval in cmp_ok) t/cz-
03zlib-v1.t line 1248.

I'm not seeing this if I build the same version of IO-Compress against
perl 5.12.0, perl 5.14.0 or perl 5.14.2.

I have confirmed all of the above on two different Linux/i386 boxes.

I am attaching a small program which is a stripped-down version of the
test file displaying the warnings.

As my program demonstrates, "'foobar' == Z_OK" would constitute a
passing test but generate the non-numeric warning. Is numeric equality
the best way to test here?

Thank you very much.
Jim Keenan

@p5pRT
Copy link
Author

p5pRT commented Feb 17, 2012

From @jkeenan

use lib qw( cpan/IO-Compress/t/compress );
use strict;
use warnings;
use bytes;

use Test::More qw( no_plan );
use CompTestUtils;
use Symbol;

BEGIN { 
     use_ok('Compress::Zlib', qw(:ALL memGunzip memGzip zlib_version));
     use_ok('IO::Compress::Gzip::Constants') ;
     use_ok('IO::Compress::Gzip', qw($GzipError)) ;
}

\# Check zlib_version and ZLIB_VERSION are the same\.
SKIP: {
     skip "TEST_SKIP_VERSION_CHECK is set", 1 
         if $ENV{TEST_SKIP_VERSION_CHECK};
     is Compress::Zlib::zlib_version, ZLIB_VERSION,
         "ZLIB_VERSION matches Compress::Zlib::zlib_version" ;
}

{
     title "repeated calls to flush";

     my $hello = "I am a HAL 9000 computer" ;
     my ($err, $x, $X, $status); 
 
     ok( ($x, $err) = deflateInit ( ), "Create deflate object" );
     isa_ok $x, "Compress::Raw::Zlib::deflateStream" ;
     cmp_ok $err, '==', Z_OK, "status is Z_OK" ;
 
     $status = $x->deflate($hello, $X) ;
     cmp_ok $status, '==', Z_OK, "deflate returned Z_OK" ;
     cmp_ok 'foobar', '==', Z_OK, "FWIW, 'foobar' is numerically equal to Z_OK" ;
     
     cmp_ok  $x->flush($X, Z_SYNC_FLUSH), '==', Z_OK, "flush returned Z_OK" ;    
     $X = '';
     cmp_ok  $x->flush($X, Z_SYNC_FLUSH), '==', Z_OK, "second flush returned Z_OK" ; 
     is $X, "", "no output from second flush";
}

@p5pRT
Copy link
Author

p5pRT commented Feb 17, 2012

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Feb 17, 2012

From @nwc10

On Fri, Feb 17, 2012 at 11​:14​:21AM -0800, James E Keenan via RT wrote​:

On Tue Feb 14 10​:38​:58 2012, nicholas wrote​:

I'm seeing this in blead​:

../cpan/IO-Compress/t/cz-03zlib-v1.t ..............................
1/464 Argument "xM-^\" isn't numeric in numeric eq (==) at (eval in
cmp_ok) t/cz-03zlib-v1.t line 1244.
Argument "M-sTHM-LUHTM-ppM-tQM-0400PHM-NM-O-(-I-^B\0OM-^V^G&" isn't
numeric in numeric eq (==) at (eval in cmp_ok) t/cz-03zlib-v1.t line
1246.
Argument "" isn't numeric in numeric eq (==) at (eval in cmp_ok) t/cz-
03zlib-v1.t line 1248.

I'm not seeing this if I build the same version of IO-Compress against
perl 5.12.0, perl 5.14.0 or perl 5.14.2.

I have confirmed all of the above on two different Linux/i386 boxes.

I am attaching a small program which is a stripped-down version of the
test file displaying the warnings.

Thanks for confirming the problem and reducing the test case.

As my program demonstrates, "'foobar' == Z_OK" would constitute a
passing test but generate the non-numeric warning. Is numeric equality
the best way to test here?

No, it doesn't seem to be.

But really what I'm wondering is why *the same code* doesn't warn on
previous versions of perl.

Nicholas Clark

@p5pRT
Copy link
Author

p5pRT commented Feb 17, 2012

From @pmqs

From​: Nicholas Clark (via RT) [mailto​:perlbug-followup@​perl.org]

# New Ticket Created by Nicholas Clark # Please include the string​:
[perl #110736] # in the subject line of all future correspondence about this
issue.
# <URL​: https://rt-archive.perl.org/perl5/Ticket/Display.html?id=110736 >

I'm seeing this in blead​:

../cpan/IO-Compress/t/cz-03zlib-v1.t .............................. 1/464
Argument "xM-^\" isn't numeric in numeric eq (==) at (eval in cmp_ok)
t/cz-03zlib-v1.t line 1244.
Argument "M-sTHM-LUHTM-ppM-tQM-0400PHM-NM-O-(-I-^B\0OM-^V^G&" isn't
numeric in numeric eq (==) at (eval in cmp_ok) t/cz-03zlib-v1.t line 1246.
Argument "" isn't numeric in numeric eq (==) at (eval in cmp_ok)
t/cz-03zlib-v1.t line 1248.

I'm not seeing this if I build the same version of IO-Compress against
perl 5.12.0, perl 5.14.0 or perl 5.14.2.

perl 5.14.2 has the same version of Test​::More as blead.

Hence I'm rather at a loss as to what the underlying cause is, and whether
it's a symptom of a real problem.

Even if it's cosmetic, I think we should fix it before perl 5.16.0 ships.

It's a dumb bug in the test harness. I'll get a new version uploaded to
CPAN.

Paul

@p5pRT
Copy link
Author

p5pRT commented Feb 18, 2012

From @pmqs

On Fri Feb 17 12​:07​:11 2012, nicholas wrote​:

On Fri, Feb 17, 2012 at 11​:14​:21AM -0800, James E Keenan via RT wrote​:

On Tue Feb 14 10​:38​:58 2012, nicholas wrote​:

I'm seeing this in blead​:

../cpan/IO-Compress/t/cz-03zlib-v1.t ..............................
1/464 Argument "xM-^\" isn't numeric in numeric eq (==) at (eval in
cmp_ok) t/cz-03zlib-v1.t line 1244.
Argument "M-sTHM-LUHTM-ppM-tQM-0400PHM-NM-O-(-I-^B\0OM-^V^G&" isn't
numeric in numeric eq (==) at (eval in cmp_ok) t/cz-03zlib-v1.t line
1246.
Argument "" isn't numeric in numeric eq (==) at (eval in cmp_ok) t/cz-
03zlib-v1.t line 1248.

I'm not seeing this if I build the same version of IO-Compress against
perl 5.12.0, perl 5.14.0 or perl 5.14.2.

I have confirmed all of the above on two different Linux/i386 boxes.

I am attaching a small program which is a stripped-down version of the
test file displaying the warnings.

Thanks for confirming the problem and reducing the test case.

As my program demonstrates, "'foobar' == Z_OK" would constitute a
passing test but generate the non-numeric warning. Is numeric equality
the best way to test here?

No, it doesn't seem to be.

The tests were supposed to be checking that the status codes returned
from the deflate & flush methods were equal to Z_OK (which is 0). They
were actually testing that the compressed data returned from those
methods was == 0. That was just a coding error on my part, so the
warning is the correct behaviour.

I've fixed the mistake in my development copy.

But really what I'm wondering is why *the same code* doesn't warn on
previous versions of perl.

Indeed so.

Interestingly, I get the warnings with blead on a 64-bit RHEL 6.1 but
not on Ubuntu 10.04 32-bit. RHEL was synced from git earlier today.
Ubuntu about 30 minutes ago.

Paul

@p5pRT
Copy link
Author

p5pRT commented Feb 18, 2012

From @pmqs

Uploaded new version of IO-Compress to CPAN. That should silence the
warning.

Paul

@p5pRT
Copy link
Author

p5pRT commented Feb 29, 2012

From @rjbs

On Sat Feb 18 14​:05​:56 2012, pmqs wrote​:

Uploaded new version of IO-Compress to CPAN. That should silence the
warning.

Paul, as you may recall, the new version, which includes other change, had some failures when it
was landed in blead.

I wonder if you would be so kind as to build a release (with a dev version number, likely) with
*only* the warning fixed? Then we could import that and silence the warning by 5.16.0.

Since you've said this is just a test coding error, I'm not steadfast that we can't release with this
warning in place, but it would still be nice to see it fixed.

Thanks very much.

@p5pRT
Copy link
Author

p5pRT commented Mar 6, 2012

From @pmqs

On Tue Feb 28 19​:35​:40 2012, rjbs wrote​:

On Sat Feb 18 14​:05​:56 2012, pmqs wrote​:

Uploaded new version of IO-Compress to CPAN. That should silence the
warning.

Paul, as you may recall, the new version, which includes other change,
had some failures when it
was landed in blead.

I wonder if you would be so kind as to build a release (with a dev
version number, likely) with
*only* the warning fixed? Then we could import that and silence the
warning by 5.16.0.

Since you've said this is just a test coding error, I'm not steadfast
that we can't release with this
warning in place, but it would still be nice to see it fixed.

Thanks very much.

Is there any reason not to include the latest version of IO-Compress in
5,16?

The only differences I can see between 2.048 (in blead) and 2.049 (on
CPAN) are fixes to the test harness.

Apart, that is, from updating the version dependencies to
Compress-Raw-Zlib & Bzip2. Is that your concern?

sorry for not responding sooner. For some reason didn't see your request.

Paul

@p5pRT
Copy link
Author

p5pRT commented Mar 16, 2012

From @rjbs

Is there any reason not to include the latest version of IO-Compress in
5,16?

The only differences I can see between 2.048 (in blead) and 2.049 (on
CPAN) are fixes to the test harness.

Apart, that is, from updating the version dependencies to
Compress-Raw-Zlib & Bzip2. Is that your concern?

sorry for not responding sooner. For some reason didn't see your request.

Funny, I didn't see YOUR email either.

The latest releases do not build with g++

BinGOs applied the K&R header fixer (if I recall correctly) but then we hit type errors. At this
point, I don't think we're going to upgrade just to squash the warning.

Dealing with the introduction and reversion of the new compression libraries has caused a
bunch of churn that I'd rather avoid a third time. This warning is not really going to block
5.16.0, but I will leave this ticket open for now, in case building a warning-free dev release is
plausible. Either way, thanks for your time!

@p5pRT
Copy link
Author

p5pRT commented Mar 19, 2012

From @pmqs

From​: Ricardo SIGNES via RT [mailto​:perlbug-followup@​perl.org]

Is there any reason not to include the latest version of IO-Compress
in 5,16?

The only differences I can see between 2.048 (in blead) and 2.049 (on
CPAN) are fixes to the test harness.

Apart, that is, from updating the version dependencies to
Compress-Raw-Zlib & Bzip2. Is that your concern?

sorry for not responding sooner. For some reason didn't see your request.

Funny, I didn't see YOUR email either.

The latest releases do not build with g++

BinGOs applied the K&R header fixer (if I recall correctly) but then we hit
type errors. At this point, I don't think we're going to upgrade just to
squash the warning.

Dealing with the introduction and reversion of the new compression libraries
has caused a bunch of churn that I'd rather avoid a third time. This warning
is not really going to block 5.16.0, but I will leave this ticket open for now,
in case building a warning-free dev release is plausible. Either way, thanks
for your time!

I see core has revered to 2.048, which is the most sensible move until 5.16 is out. If there is anything needed done before 5.16, please shout.

Paul

@p5pRT
Copy link
Author

p5pRT commented Mar 23, 2012

From @rjbs

At this point I think the solution is to suck it up and live with the warnings. We will upgrade IO-
Compress, etc, after the code freeze, after they build everywhere nicely.

@p5pRT
Copy link
Author

p5pRT commented Mar 23, 2012

From [Unknown Contact. See original ticket]

At this point I think the solution is to suck it up and live with the warnings. We will upgrade IO-
Compress, etc, after the code freeze, after they build everywhere nicely.

@p5pRT
Copy link
Author

p5pRT commented Mar 23, 2012

@rjbs - Status changed from 'open' to 'resolved'

@p5pRT p5pRT closed this as completed Mar 23, 2012
@p5pRT
Copy link
Author

p5pRT commented Mar 23, 2012

From rmbarker.cpan@btinternet.com

On Thu, 2012-03-22 at 18​:37 -0700, Ricardo SIGNES via RT wrote​:

At this point I think the solution is to suck it up and live with the warnings. We will upgrade IO-
Compress, etc, after the code freeze, after they build everywhere nicely.

I think it would work to just update t/cz-03zlib-v1.t from the latest
distribution without updating the other files.

Robin

@p5pRT
Copy link
Author

p5pRT commented Mar 23, 2012

From @pmqs

From​: Robin Barker [mailto​:rmbarker.cpan@​btinternet.com]

On Thu, 2012-03-22 at 18​:37 -0700, Ricardo SIGNES via RT wrote​:

At this point I think the solution is to suck it up and live with the
warnings. We will upgrade IO- Compress, etc, after the code freeze, after they build everywhere nicely.

I think it would work to just update t/cz-03zlib-v1.t from the latest distribution without updating the other files.

I thought core had been reverted back past where I introduced the warning

Paul

@p5pRT
Copy link
Author

p5pRT commented Mar 23, 2012

From @rjbs

* Paul Marquess <Paul.Marquess@​ntlworld.com> [2012-03-23T15​:59​:00]

From​: Robin Barker [mailto​:rmbarker.cpan@​btinternet.com]

On Thu, 2012-03-22 at 18​:37 -0700, Ricardo SIGNES via RT wrote​:

At this point I think the solution is to suck it up and live with the
warnings. We will upgrade IO- Compress, etc, after the code freeze, after they build everywhere nicely.

I think it would work to just update t/cz-03zlib-v1.t from the latest
distribution without updating the other files.

I thought core had been reverted back past where I introduced the warning

No, core was reverted back to where everything built everywhere, but the
warning existed. My understanding from the bug (link below) is that the
warning-introducing change was not in IO-Compress, but elsewhere.

https://rt-archive.perl.org/perl5/Ticket/Display.html?id=110736#txn-1088272

--
rjbs

@p5pRT
Copy link
Author

p5pRT commented Mar 23, 2012

From @bingos

On Fri, Mar 23, 2012 at 07​:59​:00PM -0000, Paul Marquess wrote​:

On Thu, 2012-03-22 at 18​:37 -0700, Ricardo SIGNES via RT wrote​:

At this point I think the solution is to suck it up and live with the
warnings. We will upgrade IO- Compress, etc, after the code freeze, after they build everywhere nicely.

I think it would work to just update t/cz-03zlib-v1.t from the latest distribution without updating the other files.

I thought core had been reverted back past where I introduced the warning

Reverted from 2.049 (and 2.051 for Compress-Raw-Zlib) back to 2.048

http​://perl5.git.perl.org/perl.git/shortlog/refs/heads/smoke-me/compression-modules

has all the applicable commits that were reverted.

I have created a smoke-me branch

http​://perl5.git.perl.org/perl.git/shortlog/refs/heads/smoke-me/cz-03zlib-v1.t

with the t/cz-03zlib-v1.t update only.

--
Chris Williams
aka BinGOs
PGP ID 0x4658671F
http​://www.gumbynet.org.uk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant