develooper Front page | perl.perl5.porters | Postings from March 2017

Re: [perl #131031] t/run/runenv.t: Guard against possible presenceof PERL_USE_UNSAFE_INC=1

Thread Previous | Thread Next
From:
Sawyer X
Date:
March 21, 2017 20:19
Subject:
Re: [perl #131031] t/run/runenv.t: Guard against possible presenceof PERL_USE_UNSAFE_INC=1
Message ID:
b2f5c303-868c-ac80-cbac-8e9ff0d34804@gmail.com


On 03/21/2017 06:14 PM, James E Keenan via RT wrote:
> On Tue, 21 Mar 2017 16:47:37 GMT, jkeen@verizon.net wrote:
>> This is a bug report for perl from jkeenan@zareason.(none),
>> generated with the help of perlbug 1.40 running under perl 5.24.1.
>>
>>
>> -----------------------------------------------------------------
>> [Please describe your issue here]
>>
>> Today I went to build and test blead at commit
>> 295d6d042a7c8bac9b1d5d201a473c7723b50d3f.  I got a test failure in
>> t/run/runenv.t -- a test failure which I had not observed building
>> blead
>> yesterday.
>>
>> #####
>> cd t; ./perl harness -v run/runenv.t; cd -
>> ...
>> ok 61 - No errors when determining @INC
>> not ok 62 - . is not in @INC
>> # Failed test 62 - . is not in @INC at ./run/runenv.t line 301
>> #####
>>
>> The test itself is not new; it was committed in January of this year.
>>
>> Some IRC #p5p dialogue:
>>
>> #####
>> (11:02:38 AM) kid51: Hmm, maybe the test failure was due to having
>> PERL_USE_UNSAFE_INC=1 in that terminal, which has been open since
>> yesterday
>> (11:02:55 AM) kid51: Yes, that was the problem
>> (11:04:45 AM) ilmari: we don't actually have any tests for that env
>> var
>> (11:07:35 AM) kid51: Yeah ... but shouldn't we know whether that ENV
>> var
>> (or any other ENV var) has been set before running *any* tests?
>> (11:09:02 AM) ilmari: ah, t/TEST clears a bunch of vars already, it
>> could be added there
>> (11:09:48 AM) kid51: In fact, going forward, shouldn't the presence of
>> both PERL_USE_UNSAFE_INC=1 and $Config{default_inc_excludes_dot} be
>> detected by Configure and flagged as an error?
>> (11:11:09 AM) ilmari: but this test specifically should clear it too
>> (it
>> already clears PERL5LIB and others)
>> (11:11:33 AM) ilmari: I don't see why
>> (11:11:41 AM) ilmari: PERL_USE_UNSAFE_INC doesn't affect the build
>> (11:11:54 AM) ilmari: but the tests should handle it being set
>> #####
>>
>> Attached is a patch to address the immediate problem.  Please review.
>> Better approaches welcome.
>>
>> Thank you very much.
>> Jim Keenan
>>
> Other (probably better) solution available in this branch:
>
> smoke-me/ilmari/unsafe-inc-env

+1 to that.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About