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

we run *all* our tests with dot in @INC

Thread Next
From:
Dave Mitchell
Date:
April 6, 2017 19:51
Subject:
we run *all* our tests with dot in @INC
Message ID:
20170406195134.GO29009@iabyn.com
While looking into some issues with 'do', and wondering why they weren't
triggering test failures, I eventually realised that in blead we currently
execute *every* test script (apart from ones invoked with taint) with '.'
in @INC!

I'm assuming that this wasn't intended, and I therefore propose to fix up
t/TEST and TestInit.pm so that, apart from a temporary hard-coded exclusion
list of various tests under cpan/, all tests are run without '.'.
We then fix up tests under t/, ext/, dist/, etc to not need '.', and then
people who normally push new CPAN releases from dist will presumably Do
Their Thing.

Then in time as upstream distributions are made dot-safe, we pull them
into blead and remove them from the cpan/ exclusion list.

I also suspect our handling of $PERL_USE_UNSAFE_INC in t/TEST and t/harness
is wrong: we just delete it from the environment if it exists; this means
that if someone explicitly runs the test suite with PERL_USE_UNSAFE_INC=0
various sub-process might set it again. My current feeling is that they
should just leave it unchanged; if people want to explicitly run the test
suite with PERL_USE_UNSAFE_INC=0 or PERL_USE_UNSAFE_INC=1, they're
probably expecting all perl sub-processes to be enabled or disabled
accordingly. This is a bit different from other PERL_ environment
variables , which are more likely to be set up in a user's general
environment and will screw up testing of a new perl.

Anyway, here's a list of all the tests in core which currently fail if '.'
is no longer set by TestInit.pm; (some of these will already have been
spotted in the separate 'do' discussion):

    op/index_thr.t
    op/substr_thr.t
    porting/bench.t
    porting/copyright.t
    porting/manifest.t
    re/pat_advanced_thr.t
    re/pat_psycho_thr.t
    re/pat_re_eval_thr.t
    re/pat_rt_report_thr.t
    re/pat_special_cc_thr.t
    re/pat_thr.t
    re/reg_email_thr.t
    re/regexp_unicode_prop_thr.t
    re/speed_thr.t
    uni/lower.t
    uni/title.t
    uni/upper.t
    ../ext/arybase/t/scope.t
    ../ext/Pod-Html/t/crossref2.t
    ../ext/Pod-Html/t/crossref3.t
    ../ext/Pod-Html/t/crossref.t
    ../ext/Pod-Html/t/feature2.t
    ../ext/Pod-Html/t/feature.t
    ../ext/Pod-Html/t/htmldir1.t
    ../ext/Pod-Html/t/htmldir2.t
    ../ext/Pod-Html/t/htmldir3.t
    ../ext/Pod-Html/t/htmldir4.t
    ../ext/Pod-Html/t/htmldir5.t
    ../ext/Pod-Html/t/htmlescp.t
    ../ext/Pod-Html/t/htmllink.t
    ../ext/Pod-Html/t/htmlview.t
    ../ext/Pod-Html/t/poderr.t
    ../ext/Pod-Html/t/podnoerr.t
    ../ext/XS-APItest/t/blockhooks.t
    ../ext/XS-APItest/t/labelconst.t
    ../lib/B/Deparse.t
    ../dist/base/t/base-open-chunk.t
    ../dist/base/t/base-open-line.t
    ../dist/ExtUtils-ParseXS/t/001-basic.t
    ../dist/ExtUtils-ParseXS/t/002-more.t
    ../dist/ExtUtils-ParseXS/t/003-usage.t
    ../dist/Time-HiRes/t/alarm.t
    ../dist/Time-HiRes/t/clock.t
    ../dist/Time-HiRes/t/gettimeofday.t
    ../dist/Time-HiRes/t/itimer.t
    ../dist/Time-HiRes/t/nanosleep.t
    ../dist/Time-HiRes/t/sleep.t
    ../dist/Time-HiRes/t/stat.t
    ../dist/Time-HiRes/t/time.t
    ../dist/Time-HiRes/t/ualarm.t
    ../dist/Time-HiRes/t/usleep.t
    ../dist/Time-HiRes/t/utime.t
    ../cpan/ExtUtils-Install/t/Installed.t
    ../cpan/Filter-Util-Call/t/call.t
    ../cpan/libnet/t/config.t
    ../cpan/libnet/t/datasend.t
    ../cpan/libnet/t/netrc.t
    ../cpan/libnet/t/time.t
    ../cpan/Locale-Codes/t/country_old.t
    ../cpan/Locale-Codes/t/country.t
    ../cpan/Locale-Codes/t/currency_old.t
    ../cpan/Locale-Codes/t/currency.t
    ../cpan/Locale-Codes/t/langext.t
    ../cpan/Locale-Codes/t/langfam.t
    ../cpan/Locale-Codes/t/language_old.t
    ../cpan/Locale-Codes/t/language.t
    ../cpan/Locale-Codes/t/langvar.t
    ../cpan/Locale-Codes/t/script_old.t
    ../cpan/Locale-Codes/t/script.t
    ../cpan/Math-BigInt/t/bare_mbf.t
    ../cpan/Math-BigInt/t/bare_mbi.t
    ../cpan/Math-BigInt/t/bare_mif.t
    ../cpan/Math-BigInt/t/bigfltpm.t
    ../cpan/Math-BigInt/t/bigintpm.t
    ../cpan/Math-BigInt/t/mbf_ali.t
    ../cpan/Math-BigInt/t/mbi_ali.t
    ../cpan/Math-BigInt/t/mbimbf.t
    ../cpan/Math-BigInt/t/sub_ali.t
    ../cpan/Math-BigInt/t/sub_mbf.t
    ../cpan/Math-BigInt/t/sub_mbi.t
    ../cpan/Math-BigInt/t/sub_mif.t
    ../cpan/Math-BigInt/t/upgrade.t
    ../cpan/Math-BigInt/t/with_sub.t
    ../cpan/Math-BigRat/t/bigratpm.t
    ../cpan/Test-Harness/t/nofork-mux.t
    ../cpan/Test-Simple/t/Legacy/subtest/do.t
    ../cpan/Test-Simple/t/Legacy/Tester/tbt_09do.t
    ../cpan/Test-Simple/t/regression/696-intercept_skip_all.t
    ../cpan/version/t/01base.t
    ../cpan/version/t/02derived.t
    ../cpan/version/t/03require.t



-- 
I thought I was wrong once, but I was mistaken.

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