[rt.cpan.org #54825] Warnings During Build

2011-01-22 Thread Sisyphus via RT
https://rt.cpan.org/Ticket/Display.html?id=54825 >

On Fri Jan 21 06:41:28 2011, JAWNSY wrote:

> Reopening for a very quick question: have you considered using
> Test::Warn? It will ensure the warnings are emitted, while at the same
> time suppressing them from test output.

I guess it would be ok to suppress those taint-related warnings from 
the test suite output (if we can find a satisfactory way of doing 
that). One way would be to set the config option 'NO_UNTAINT_WARN => 
1;' in the test script.
However, I'd rather *not* do that in case someone uses that test script 
as a template, thereby running their scripts with 'NO_UNTAINT_WARN => 
1;', totally oblivious to the sorts of things that Inline is doing 
under the hood.

My attempts at using Test::Warn to detect and suppress the warnings 
have not yet worked:

#
use warnings;
use strict;
use Test::More tests => 1;

use Test::Warn;

use Inline Config =>
UNTAINT => 1,
DIRECTORY => '_Inline_test';


use Inline C => <<'END_OF_C_CODE';

int add(int x, int y) {
return x + y;
}

END_OF_C_CODE

warnings_are {add(3,4)} [];
#

The warnings are issued during Inline's build phase, before the 
warnings_are() test is run - so I get output of:

#
1..1
In Inline::env_untaint() : Blindly untainting tainted fields in %ENV.
In Inline::check_config_file(): Blindly untainting Inline configuration 
file information.
In Inline::env_untaint() : Blindly untainting tainted fields in %ENV.
In Inline::obj_untaint() : Blindly untainting tainted fields in Inline 
object.
ok 1
#

I'll keep looking at this (as time permits) until I either find a way 
to make it work, or come to an understanding that it can't be made to 
work.

Cheers,
Rob


[rt.cpan.org #54825] Warnings During Build

2011-01-21 Thread Sisyphus via RT
https://rt.cpan.org/Ticket/Display.html?id=54825 >

Hi,
The "Subroutine Inline::C::get_parser redefined..." warnings and 
associated diagnostic comments have gone, but the "Blindly 
untaininting ..." warnings are still there (as I believe it's important 
that Inline tells us that it's doing these things).

During the running of the test suite these warnings are, however, now 
pre-announced with the message:

Expect a number of "Blindly untainting ..." warnings - these are 
intended.

So I'm now closing this ticket.
But check out Inline-0.47 (uploaded to CPAN today) and see what you 
think. If you require further action on this (or would simply prefer 
that the ticket remain open), please feel free to re-open it. (I think 
you can do that by simply updating this ticket ... not sure :-)

Cheers,
Rob




[rt.cpan.org #54825] Warnings During Build

2010-02-21 Thread Sisyphus via RT
https://rt.cpan.org/Ticket/Display.html?id=54825 >

On Sat Feb 20 14:01:05 2010, JAWNSY wrote:
> Hi there,
> 
> While trying to build the latest version of Inline for Debian (where 
it
> is packaged as libinline-perl), I encountered several warnings and
> suspicious diagnostic output during testing. As far as I can tell from
> the toolchain output, there were no dependencies missing during build.
> 
> What follows is the test output:
> 
>dh_auto_test
> make[1]: Entering directory
> `/build/jon-libinline-perl_0.46-1-i386-lJq_CL/libinline-perl-0.46'
> make[2]: Entering directory
> `/build/jon-libinline-perl_0.46-1-i386-lJq_CL/libinline-perl-0.46/C'
> make[2]: Leaving directory
> `/build/jon-libinline-perl_0.46-1-i386-lJq_CL/libinline-perl-0.46/C'
> PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e"
> "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
> t/00init.t  ok
> t/01usages.t .. ok
> t/02config.t .. ok
> t/03errors.t .. ok
> t/04create.t .. ok
> t/05files.t ... skipped: (no reason given)
> All tests successful.
> Files=6, Tests=14, 11 wallclock secs ( 0.04 usr  0.02 sys +  0.50 
cusr 
> 0.10 csys =  0.66 CPU)
> Result: PASS
> make[2]: Entering directory
> `/build/jon-libinline-perl_0.46-1-i386-lJq_CL/libinline-perl-0.46/C'
> PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e"
> "test_harness(0, '../blib/lib', '../blib/arch')" t/*.t
> t/00init.t ... ok
> t/01syntax.t . ok
> t/02config.t . ok
> t/03typemap.t  ok
> t/04perlapi.t  ok
> t/05xsmode.t . ok
> Subroutine Inline::C::get_parser redefined at ../blib/lib/Inline.pm 
line
> 312 (#1)
> (W redefine) You redefined a subroutine.  To suppress this 
warning, say
> 
> {
> no warnings 'redefine';
> eval "sub name { ... }";
> }
>
> t/06parseregexp.t  ok
> Subroutine Inline::C::get_parser redefined at ../blib/lib/Inline.pm 
line
> 312 (#1)
> (W redefine) You redefined a subroutine.  To suppress this 
warning, say
> 
> {
> no warnings 'redefine';
> eval "sub name { ... }";
> }
> 
> t/07typemap_multi.t .. ok
> In Inline::env_untaint() : Blindly untainting tainted fields in %ENV.
> In Inline::env_untaint() : Blindly untainting tainted fields in %ENV.
> In Inline::obj_untaint() : Blindly untainting tainted fields in Inline
> object.
> In Inline::env_untaint() : Blindly untainting tainted fields in %ENV.
> In Inline::env_untaint() : Blindly untainting tainted fields in %ENV.
> In Inline::obj_untaint() : Blindly untainting tainted fields in Inline
> object.
> In Inline::env_untaint() : Blindly untainting tainted fields in %ENV.
> In Inline::env_untaint() : Blindly untainting tainted fields in %ENV.
> In Inline::obj_untaint() : Blindly untainting tainted fields in Inline
> object.
> In Inline::env_untaint() : Blindly untainting tainted fields in %ENV.
> In Inline::env_untaint() : Blindly untainting tainted fields in %ENV.
> In Inline::obj_untaint() : Blindly untainting tainted fields in Inline
> object.
> t/08taint.t .. ok
> All tests successful.
> Files=9, Tests=21, 13 wallclock secs ( 0.02 usr  0.02 sys +  9.50 
cusr 
> 3.24 csys = 12.78 CPU)
> Result: PASS
> 
> This regression appears to have been introduced in version 0.46;
> rebuilding 0.45 with the most recent perl and other dependencies 
yields
> the following test output:
> 
>dh_auto_test
> make[1]: Entering directory
> `/build/jon-libinline-perl_0.45-1-i386-dvYTxJ/libinline-perl-0.45'
> make[2]: Entering directory
> `/build/jon-libinline-perl_0.45-1-i386-dvYTxJ/libinline-perl-0.45/C'
> make[2]: Leaving directory
> `/build/jon-libinline-perl_0.45-1-i386-dvYTxJ/libinline-perl-0.45/C'
> PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e"
> "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
> t/00init.t  ok
> t/01usages.t .. ok
> t/02config.t .. ok
> t/03errors.t .. ok
> t/04create.t .. ok
> t/05files.t ... skipped: (no reason given)
> All tests successful.
> Files=6, Tests=14, 10 wallclock secs ( 0.04 usr  0.02 sys +  0.56 
cusr 
> 0.06 csys =  0.68 CPU)
> Result: PASS
> make[2]: Entering directory
> `/build/jon-libinline-perl_0.45-1-i386-dvYTxJ/libinline-perl-0.45/C'
> PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e"
> "test_harness(0, '../blib/lib', '../blib/arch')" t/*.t
> t/00init.t ... ok
> t/01syntax.t . ok
> t/02config.t . ok
> t/03typemap.t  ok
> t/04perlapi.t  ok
> t/05xsmode.t . ok
> t/06parseregexp.t  ok
> t/07typemap_multi.t .. ok
> All tests successful.
> Files=8, Tests=16, 10 wallclock secs ( 0.04 usr  0.02 sys +  7.00 
cusr 
> 2.48 csys =  9.54 CPU)
> Result: PASS

The "suspicious diagnostic output" is just the standard "use 
diagnostics;" ouptut - assuming I've correctly identified the output 
you're referring to :-) 

The redefinition warnings come about as a result of "fixing" #49669:
https://rt.cpan.org/Public/Bug/Display.html?id=49669