summaryrefslogtreecommitdiff
path: root/t/TEST
Commit message (Collapse)AuthorAgeFilesLines
* Remove ExtUtils-Command, it is merged in EUMM nowChris 'BinGOs' Williams2015-09-141-1/+0
|
* Skip testing all of /cpan on EBCDIC platforms for 5.22Karl Williamson2015-03-141-0/+5
| | | | | | | | The state of porting to EBCDIC that's going to get into 5.22 leaves many many error lines being displayed when 'make test' is run if the /cpan directory is included. Reluctantly, I'm excluding these tests for 5.22. I plan to work on either fixing or having individual skips in them in 5.23, but that is not the current state.
* t/TEST: Avoid SIGPIPEs on os390Karl Williamson2015-03-131-0/+3
| | | | | This works around a problem with z/OS where if there are unread lines from a file descriptor using this, a SIGPIPE error is raised.
* TEST: Comment for 804352e2Father Chrysostomos2015-01-071-0/+2
|
* Avoid glob in t/TEST on non-WindowsFather Chrysostomos2015-01-071-1/+1
| | | | | | | | | | | See ticket #123561. The presence of ‘glob’ was causing perl to attempt to File::Glob at compile time, before @INC is set up. Windows needs to do file globbing on @ARGV for t/TEST to work cor- rectly. Windows only uses TEST for miniperl (it uses harness for ‘make test’), and under miniperl ‘glob’ doesn’t use File::Glob. So it is safe to use ‘glob’ on Windows. For the sake of other systems, we can put it in a string eval to avoid even compiling the op.
* t/TEST: glob the supplied filenames on Win32Tony Cook2015-01-061-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | since Win32 perl doesn't glob by default at this point the following tests fail: io/dup.t io/fs.t io/open.t io/perlio_leaks.t op/coreamp.t op/filetest.t op/fork.t op/fresh_perl_utf8.t op/glob.t op/heredoc.t op/magic.t op/read.t op/readline.t op/sselect.t op/stat.t op/substr.t op/tie_fetch_count.t op/write.t
* Show elapsed wallclock time in t/TEST.Jarkko Hietaniemi2014-12-011-0/+4
|
* Revert "t/TEST: add -w to shebang, fix a used-once warning"Father Chrysostomos2014-11-131-2/+2
| | | | | | | | This reverts commit da6e3e61d3d3194e7f769b7ddf7e6d16904c24d3. This causes problems for deparse mode, which emits pages of warnings. If we are going to add -w, we ought first to fix deparse testing to work with it.
* Revert "t/TEST: move our @found out to its real scope"Jarkko Hietaniemi2014-11-071-2/+1
| | | | This reverts commit 448bc2e91e255b2610f23d9fe8092c9143dac28e.
* Revert "t/TEST: $failure doesnt need to use defined"Jarkko Hietaniemi2014-11-071-6/+8
| | | | This reverts commit 861a58daef615e7ade791b887911ef3caba8c539.
* Revert "t/TEST: add a common timestamp"Jarkko Hietaniemi2014-11-071-7/+3
| | | | This reverts commit 3c8571535150a64cf1163a15106d0f9e57fdd6a7.
* Revert "t/TEST: comment some of the <$results> loop vars"Jarkko Hietaniemi2014-11-071-5/+5
| | | | This reverts commit 861aa4195fddf02db2d2d1412c83a273daae9f05.
* Revert "t/TEST: move do_nothing test after option-handling code"Jarkko Hietaniemi2014-11-071-4/+5
| | | | This reverts commit 922487b2e3c980db625829f57958aac6a3e33552.
* Revert "t/TEST: add -lxperf option to run tests under linux's perf stat"Jarkko Hietaniemi2014-11-071-32/+1
| | | | This reverts commit 02a483e9608abd0f822d7c8ec6d64c07c4689e55.
* Revert "t/TEST: simplify <$results> processing loop. - TAP13.1+"Jarkko Hietaniemi2014-11-071-41/+46
| | | | This reverts commit b8059a1db50cef0ea798275144b6d2f54a288946.
* Revert "t/TEST: change timings Storable key: perf -> times, a better ↵Jarkko Hietaniemi2014-11-071-6/+6
| | | | | | description" This reverts commit ba369d6f39f2f98f9e999dc978baeba4d4efba25.
* Revert "t/TEST: suppress 2 uninitialized envars under make test.valgrind"Jarkko Hietaniemi2014-11-071-3/+1
| | | | This reverts commit e28ec392de528ba135a100709ce789a168286f86.
* Revert "t/TEST: RFC start to separate out valgrind test support."Jarkko Hietaniemi2014-11-071-4/+0
| | | | This reverts commit 08ac0af6a0260a3939c4904c299200adee71010d.
* t/TEST: RFC start to separate out valgrind test support.Jim Cromie2014-11-061-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch creates an empty t/TestValgrind.pm file, and requires it from t/TEST when ENV{PERL_VALGRIND} is set. As such its seeks to reinterpret the comments at the top of t/TEST. I propose that the "no require allowed" rule appply to code reached from "make test" without options. Code used only for special case testing, like "make test.valgrind", or with options passed in via $ENV{TEST_OPTS}, need not be constrained like this. A broken require is not something seen until the statement is executed and throws an error. There is nothing special about require at parse-time that must be avoided, unless we're more than typically paranoid. make test.valgrind /bin/sh -e ./runtests choose ./perl TEST sh -c valgrind --log-fd=3 --suppressions=perl.supp --leak-check=yes --leak-resolution=high --show-reachable=yes --num-callers=50 --track-origins=yes ./perl -I.. -MTestInit porting/podcheck.t 3>podcheck.t.valgrind-current valgrind --log-fd=3 --suppressions=perl.supp --leak-check=yes --leak-resolution=high --show-reachable=yes --num-callers=50 --track-origins=yes ./perl -I.. -MTestInit porting/podcheck.t If this argument is accepted, it looks simple to move the VALGRIND related code blocks into new subroutines in the now-empty TestValgrind.pm file, and call them appropriately.
* t/TEST: suppress 2 uninitialized envars under make test.valgrindJim Cromie2014-11-061-1/+3
| | | | | | | | | | | | | | | | | | | Recent addition of -w on shebang exposed 2 uninitialized vars, due to VG_OPTS envar added in commit 11b1a7c9, which added glue to reuse t/TEST's support for make test.valgrind to run linux perf. The 2 use-cases are: 1. make test.valgrind 2. export VG_OPTS='stat -o perf-stat --append --' export VALGRIND=/usr/bin/perf export VG_TEST=--help make test.valgrind Since 2 is rather non-obvious, clarify with comment here and in code. TODO: this patch is old, and either needs to be revalidated, or perhaps rethought; use-case 2 is mostly obsoleted by -lxperf option, but case 1 still holds.
* t/TEST: change timings Storable key: perf -> times, a better descriptionJim Cromie2014-11-061-6/+6
| | | | | | | Commit 8e03ad8f6c wrote the tests' timing data to a Storable file using 'perf' as the storage key, but now that we can capture real perf stat data during make test, the old name is misleading - change it to "times" to better describe its origin and character.
* t/TEST: simplify <$results> processing loop. - TAP13.1+Jim Cromie2014-11-061-46/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support use of the --repeat=3 option of linux's perf stat. This basically means extending the TAPv13 spec (or t/TEST's implementation) to allow repeated (ie R) plan executions (ie R occurrences of "1..N" plus the preceding or following N * "ok"s), as long as all R plans have the same N. When a test script is run (under linux perf with --repeat=N), the value of R is unavailable in the output; it is transparent other than the repetition itself. But we woundnt want it anyway; TAP readers dont need to handle a new kind of input. If we just allow R repetitions of 1..N tests, we get loose coupling and dont care if --repeat=5 were given. Current legal TAP is essentially either: print "ok $_\n" for 1..N; # 1A print "1..N\n"; # OR [1] print "1..N\n"; # 1B print "ok $_\n" for 1..N; The big simplification here is that under --repeat, leading vs trailing "1..N"s are an irrelevant detail. - "1..N" plans are only allowed before any tests, or after all of them, ie ($next==0 or $next==$plan). We just verify this when "1..N" is seen in test output. - $plan = undef initially, updated to N when "1..N" is 1st seen. - $next=0 when "1..N" is seen [2]. - when 2nd+ "1..N" plans are seen, they are allowed if they agree on N. - The change to if (defined $plan) accepts "1..0" as legal (ie SKIPs). - $seen_leader and $trailing_leader are thus obsolete, replaced where needed by "if ($plan)", which is set only when "1..N" is seen. - $seen_ok was used with $seen_leader to reset $next (test-count). now handled in [2] - $max is also taken right from "1..N", replaced with <some-expr>($plan) NOTES: [1]: this patch allows BOTH 1A then 1B to run successfully, but not 1B followed by 1A; the latter would fail on N+1 th test, because the now-trailing "1..N" failed to reset $next. This is an unimportant corner case and doesnt warrant cluttering details in the code. We are running maintained regression tests here, not logic bombs. - On "1..N" occurrences: $Reps++ to count repeats (tested at end) reset $next = 0 after validating it [1] $nextreps++, like $next w/o reset. - post-loop tests: change ($next == $max) test to ($nextreps == $Reps * $plan), which avoids the now resetting $next. TODO: This patch supports --repeat N in t/TEST only; harness is strict wrt "only 1 plan", ala TAPv13, so make test_harness complains as follows, and fails the tests. comp/use.t ........................................................ All 84 subtests passed comp/retainedlines.t .............................................. All 75 subtests passed comp/cmdopt.t ..................................................... All 44 subtests passed Sort whats reported in summary data; unique tests or repeated tests ? Reduce $totmax vs $max vs $Reps a bit, extra/redundant state is not helpful.
* t/TEST: add -lxperf option to run tests under linux's perf statJim Cromie2014-11-061-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this patch, TEST can run each test-script under linux's perf stat. Since previous patch honors options for $do_nothing / requires, harness can use perf stat too. t]$ ./perl -I../lib TEST -lxperf t]$ ./perl harness -lxperf "perf stat" output is comparable to that of "valgrind --tool=cachegrind" but it takes very little extra CPU to run: export TEST_OPTS=-lxperf time make test time make test -------------- -------------- real 25m41.122s real 26m30.719s user 18m28.773s user 18m43.286s sys 1m12.705s sys 1m33.398s Given this small runtime cost, porters might be inclined to use it and inspect the data. There may be some core regression tests that are useful for benchmarking purposes. EXAMPLES: Performance counter stats for './perl base/cond.t': 2.077911 task-clock # 0.640 CPUs utilized 2 context-switches # 0.963 K/sec 1 cpu-migrations # 0.481 K/sec 519 page-faults # 0.250 M/sec 2,753,978 cycles # 1.325 GHz 1,725,265 stalled-cycles-frontend # 62.65% frontend cycles idle 2,405,122 stalled-cycles-backend # 87.33% backend cycles idle 3,278,429 instructions # 1.19 insns per cycle # 0.73 stalled cycles per insn [52.13%] <not counted> branches <not counted> branch-misses 0.003244748 seconds time elapsed perf stat --repeat N also computes std-deviation for each measurement it does, so this patch makes that feature available. Std-dev will tell us when performance differences are lost in the noise. ./perl TEST -v -lxperf=10 re/pat_rt_report.t perf stat --repeat 10 -- ./perl -I.. -MTestInit re/pat_rt_report.t ./perl -I.. -MTestInit re/pat_rt_report.t Performance counter stats for './perl -I.. -MTestInit re/pat_rt_report.t' (10 runs): 98.749506 task-clock # 0.001 CPUs utilized ( +- 23.68% ) 68 context-switches # 0.686 K/sec ( +- 82.04% ) 10 cpu-migrations # 0.097 K/sec ( +- 17.44% ) 2,956 page-faults # 0.030 M/sec ( +- 23.22% ) 254,477,657 cycles # 2.577 GHz ( +- 26.02% ) [50.43%] 75,556,485 stalled-cycles-frontend # 29.69% frontend cycles idle ( +- 19.50% ) [50.93%] 62,921,965 stalled-cycles-backend # 24.73% backend cycles idle ( +- 25.21% ) [51.50%] 241,522,257 instructions # 0.95 insns per cycle # 0.31 stalled cycles per insn ( +- 34.07% ) [50.96%] 53,147,072 branches # 538.201 M/sec ( +- 31.19% ) [50.18%] 2,451,318 branch-misses # 4.61% of all branches ( +- 11.32% ) [49.95%] 141.101988701 seconds time elapsed ( +- 99.91% ) The patch has 3 parts: An addition to TEST:_cmd() which wraps the test invocation inside a "perf stat ..." as shown above, using a %cmdwrap template. Option-parsing code, which handles several option forms: 1) -lxperf writes file "$tstamp.perf" into ./t (after `cd $t && ...`) 2) -lxperf=4 adds "--repeat 4" to perf stat invocation. 3) -lxperf=(key=val) pairs known key=value pairs (with =defaults given) - tool=perf # path to tool - cmd=stat # todo try others, perf record, etc - reps=1 # - rptdir # write reports to a separate data-repo, safe from git clean -dxf - name # to convey branch-name and/or config-info, tstamp is prefixed, - opts # passthru options to perf-stat $ENV{TEST_OPTS} is split on /;/ and prepended to @ARGV before option handling, so the following export will affect both make jobs. export TEST_OPTS="-v;-lxperf=reps=3:rptdir=$HOME/perl/perfdata" make test make test_harness NOTES: Test script output under perf stat --repeat 4 violates the "plan just once" rule of TAPv13 spec. It could be extended: "The plan cannot appear in the middle of the output, only at beginning or end. Multiple sets of (plan + tests) are allowed, if all plans agree" perf stat --repeat N causes perf to compute std-deviation(s) for each measure. 1st example below is w/o repeat, 2nd with it, corresponding to the TEST and harness examples above. I dont know how to read into the numbers, but theres value in having them; they provide some estimate of "noise-floor" on performance for a given test. The -opts option passthru to perf stat allows "-x," to cause perf stat to emit CSV output. This is easier to parse than the human readable output, but doesnt include the computed/normalized values, nor the name that the "Performance counter stats" (see examples) are for. TODO Probable rework of -lxperf option parsing - no way now to get output to STDOUT, only to file. maybe not worth having - keep (k=v:)+ form - use name="%B-%G-%T.perf" by default "$branch-$sha1st6-$timestamp.perf" - use wr=1 to save file - dir=$HOME/perfruns (shorten rptdir) Using reps=2 yields "FAILED--seen duplicate leader" on every test. Fixing this requires changes to TEST's <results> processing loop. The reps handling sub-option code is in this patch because it serves as a test-case for further changes to optional behavior. The command wrapper template is pretty minimal and constrained; the output file name is "$dir/$timestamp$name.perfstat", chosen to match with $timestamp.ttimes so that both file-types are browsable as a pair. TEST_OPTS is split on ';', -lxperf is split on ':' into k=v pairs. There may be scenarios where these delimiters are inconvenient, or the simplistic parse is brittle. Performance counter stats for './perl base/cond.t' (3 runs):
* t/TEST: move do_nothing test after option-handling codeJim Cromie2014-11-061-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | As explained in commit c537bcda1, $do_nothing's purpose is to prevent TEST from actually running the tests, so that it can be required by harness, and its routines reused. This patch moves TEST's $do_nothing check after its option-handling code, allowing those options to be used to alter the behavior of the TEST subroutines when called by harness, the same as when they're called from TEST::main. TODO: With TEST's option handling done even for $do_nothing cases, it consumes all options before harness sees them, so harness options -v and -torture are broken. There are multiple ways to handle it, all needing some consensus: - harness does selective option scanning before requiring TEST. It could either consume its options or pass them thru once it handles them. - both -v and -torture are implemented by TEST and harness, and mean qualitatively the same thing. OTOH, any consumers of the respective outputs may care about differences. Simply, could rename one of each option to avoid the conflict. - use of $TEST::verbose (or are namespaces also to be avoided?)
* t/TEST: comment some of the <$results> loop varsJim Cromie2014-11-061-5/+5
| | | | Add comments to var declarations, to help clarify loop operation.
* t/TEST: add a common timestampJim Cromie2014-11-061-3/+7
| | | | | Commit 0978c4bed computed a timestamp string as part of an output filename, make it available for others.
* t/TEST: $failure doesnt need to use definedJim Cromie2014-11-061-8/+6
| | | | | | $failure handling in <$results> processing loop does not need extra subtlety of defined-ness checks - just give it an initial (false) value, and check for truth.
* t/TEST: move our @found out to its real scopeJim Cromie2014-11-061-1/+2
| | | | | | | | | | | | | commit c96083ea8213 added our @found inside sub _find_tests, but testing with strict exposes probs: $ perl -cw -Ilib -Mstrict t/TEST Variable "@found" is not imported at t/TEST line 198. Variable "@found" is not imported at t/TEST line 202. Global symbol "@found" requires explicit package name at t/TEST line 198. Global symbol "@found" requires explicit package name at t/TEST line 202. No point in arguing, hoist decl out to file scope.
* t/TEST: add -w to shebang, fix a used-once warningJim Cromie2014-11-061-2/+2
| | | | | | | Adding -w should be ok, despite peculiar code style; it avoids require, unlike "use strict". Added risk of perl brokenness seems vanishingly small. Fix one used-once warning thus exposed, and one test in FileHandle.t surprised by t/TEST's new '-w' in the shebang.
* fix 't/TEST -benchmark'David Mitchell2014-10-261-1/+1
| | | | | This has never worked, as it would look for t/benchmark/*.t files in the wrong place.
* add t/perf/, t/perf/opcount.tDavid Mitchell2014-10-261-1/+1
| | | | | | Add a new directory designed to hold performance / optimising tests and infrastructure, and add the first test file, opcount.t, that checks that a sub has the right numbers of particular op types
* Move ExtUtils-Install to cpan/Chris 'BinGOs' Williams2014-08-081-1/+1
| | | | The Perl Toolchain Gang has agreed to maintain this.
* Move ExtUtils-Manifest to cpan/Chris 'BinGOs' Williams2014-08-071-1/+1
| | | | Maintained by the Perl Toolchain Gang now
* Move ExtUtils-Command to cpan/Chris 'BinGOs' Williams2014-08-071-1/+1
| | | | Maintained by the Perl Toolchain Gang now
* [perl #121126] - Allow deparse tests to skip/ignore expected failures.Matthew Horsfall (alh)2014-06-131-10/+69
| | | | | | | | | | | | | | | | | | | | | This will allow us to set up a deparse smoker to keep track of B::Deparse's accuracy. With this, the test run: TEST_ARGS=-deparse make test will "pass" currently. If deparsing capabilities get worse, new failures will show up and should be fixed or added to Porting/deparse-skips.txt. If things get fixed, the test will fail noting that something has passed when it shouldn't have, and the test in question should be removed from Porting/deparse-skips.txt. Use the KEEP_DEPARSE_FILES=1 environment setting to have the deparse test files left around after a test run for examination/re-running.
* Remove old Class-ISA remnantsSteve Hay2014-05-311-1/+0
|
* Remove Package-Constants remnantSteve Hay2014-05-311-1/+0
|
* Remove Module-Build remnantsSteve Hay2014-05-311-1/+0
|
* No more x2p.Jarkko Hietaniemi2014-05-291-1/+0
|
* [perl #121431] Add support for test.valgrind parallel testing.Matthew Horsfall (alh)2014-05-281-85/+116
| | | | | | | | | | | | Output for each test will be printed inline when it finishes. Sample usage (loud): TEST_JOBS=9 make test.valgrind Sample usage (quiet): VG_OPTS='-q --leak-check=no --show-reachable=no' TEST_JOBS=9 make test.valgrind
* Revert "Add support for test.valgrind parallel testing"Karl Williamson2014-03-261-5/+6
| | | | | | | | This reverts commit f0aff2daa44923f600f6e1f2429a2add2214a9d5 "Add support for test.valgrind parallel testing" This patch was accidentally pushed (by me); it breaks some things. We will wait to add this support until after 5.20
* Add support for test.valgrind parallel testingMatthew Horsfall (via RT)2014-03-181-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | # New Ticket Created by Matthew Horsfall # Please include the string: [perl #121431] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=121431 > This is a bug report for perl from wolfsage@gmail.com, generated with the help of perlbug 1.39 running under perl 5.14.2. ----------------------------------------------------------------- [Please describe your issue here] The included patch allows test.valgrind to run tests in parallel. Valgrind output for each test will be printed out after the test completes, with the name of the test prefixing every line. Example usage might be: TEST_JOBS=8 make test.valgrind VALGRIND='valgrind -q' 2>&1 | tee out.txt -q is needed to ensure only *errors* are captured, otherwise the output will be much louder than it already is. (Perhaps this should be the default mode?) [Please do not change anything below this line] -----------------------------------------------------------------
* Remove Makefile targets and tools related to Irix and Tru64 debugging tools.Nicholas Clark2013-07-011-23/+0
| | | | | | | | | | | | | | | | | | | | | Remove the targets: perl.pixie perl.pixie.atom perl.pixie.config perl.pixie.irix perl.third perl.third.config It's still possible to run the actions these targets "by hand", if desired. This commit removes the convenience targets from the Makefile, reducing its complexity. It also removes the related support scripts testall.atom and thirdclean from Porting/ pixie is a performance analysis tool for Irix and Tru64 Third Degree is a memory checker tool for Tru64 Given that Tru64 went out of support at the end of 2012, and Irix goes out of support at the end of 2013, it's very unlikely that anyone is still actively profiling or debugging perl on either platform, and hence using these targets. It's been several years since we've even had a regular bug report from either platform.
* t/TEST: Don't bail if fails in t/base unless minitestKarl Williamson2013-05-201-2/+5
| | | | | | | | | | | | | | | | In order to completely compile Perl, many modules must have been parsed and compiled, so if there is a full perl, we know that things basically work. The purpose of bailing out is that if these supposedly very base level functionality tests don't work, there's no point in continuing. But over the years, tests of more esoteric functionality have been added here, and if one of them doesn't work, it still could be that Perl pretty much does work. I believe it would be best to move such non-basic tests elsewhere, but that's work, and hasn't bitten us much so far; this change lessens the severity of the biting even more. Where it will really bite is if things are so bad that a full perl binary can't be compiled, and we are trying to figure out why using minitest.
* Removed cpan/Log-MessageChris 'BinGOs' Williams2013-05-181-1/+0
|
* Remove cpan/Object-AccessorChris 'BinGOs' Williams2013-05-181-1/+0
|
* Remove cpan/Term-UIChris 'BinGOs' Williams2013-05-181-1/+0
|
* Remove cpan/Archive-ExtractChris 'BinGOs' Williams2013-05-181-1/+0
| | | | | | | Note: Porting/core-cpan-diff refactored to use Archive::Tar instead of Archive::Extract
* Adjust MANIFEST, Makefiles, test harnesses, documentation, etc., aware of newJames E Keenan2012-12-071-1/+1
| | | | | | directory t/opbasic. For RT #115838
* fix typo in commentLukas Mai2012-11-121-1/+1
|