about summary refs log tree commit homepage
path: root/t/run.perl
DateCommit message (Collapse)
2023-09-20rename t/run.perl to xt/check-run
This allows us to get rid of some duplication in our Makefile
2023-07-14tests: t/run.perl: fix invocations with <10 tests
We must account for the maximum index of an array to avoid filling unused slots with `undef' from out-of-bounds reads. This is needed to avoid undefined entry errors in workers when fewer than 10 tests are run. We'll also silence the message when a single test is run. While I was diagnosing this, I also noticed a small simplification and optimization in our generation of $todo_buf since I initially thought that was the cause of undefined entry errors in the $todo arrayref.
2023-01-30tests: make slow tests easier-to-find
t/run.perl now prints slowest 10 tests at startup, and I've added ./devel/longest-tests to print all tests sorted by elapsed time. This should allow us to notice outliers more quickly in the future.
2023-01-01t/run.perl: drop branch for a small set of test cases
It's not worth it, since our test count is only going to increase over time.
2021-09-26t/run.perl: less confusing error reporting
The $sigchld handler was reporting the last test (successful or not) for a given PID in case a worker dies prematurely. Instead, redisplay all failed test in $run_log to ensure the report only shows failed tests, and not the last started (and possibly successful) one.
2021-09-22treewide: fix %SIG localization, harder
This fixes the occasional t/lei-sigpipe.t infinite loop under "make check-run". Link: http://nntp.perl.org/group/perl.perl5.porters/258784 <CAHhgV8hPbcmkzWizp6Vijw921M5BOXixj4+zTh3nRS9vRBYk8w@mail.gmail.com> Followup-to: b552bb9150775fe4 ("daemon+watch: fix localization of %SIG for non-signalfd users")
2021-09-14t/run: TEST_LEI_DAEMON_PERSIST: die if pid changes
While persisting lei-daemon across different test cases isn't the default anymore, we can notice problems more quickly if the daemon PID changes since the daemon gets auto-restarted after failures.
2021-09-13use POSIX::PIPE_BUF (instead of _POSIX_PIPE_BUF)
PIPE_BUF accounts for Linux being 4096 (and presumably other OSes differing), while _POSIX_PIPE_BUF is the minimum 512 value.
2021-09-02tests: "make check-run" favors reliability over speed
Sharing a single lei-daemon across multiple processes still exhibits reliability problems, and reliably checking lei-daemon's inotify internals seems impossible without. Even without lei-daemon sharing, "make check-run" is a few seconds faster than "make check" for me.
2021-08-16t/run.perl: fix "make check-run" on FreeBSD 11.x
Persistent lei-daemon still leads to ECONNRESET client errors on FreeBSD, and maxing out the kern.ipc.soacceptqueue sysctl (as documented in the FreeBSD listen(2) manpage) doesn't seem to help. "make check-run" is still 4-5s faster than "make check" on my FreeBSD VM even after this change, so it's still a worthwhile improvement.
2021-04-28t/run: support TEST_RUN_LOG to diagnose process death
Knowing which process ran what before dying unexpectedly helps with debugging.
2021-04-28t/run.perl: add (GNU) tail and strace support
This may help track down some "make check-run" failures that don't seem to manifest under "make check".
2021-04-24test_common: don't attempt to seek on pipes and terminals
This allows proper error reporting on daemon failure when using "check-run".
2021-03-25tests: "check-run" uses persistent lei daemon
We'll use a lei-daemon if it's already running and TEST_LEI_DAEMON_PERSIST_DIR is set, but we can also start one and manage it from t/run.perl This drops "make check-run TEST_LEI_DAEMON_ONLY=1" time by ~10% for me.
2021-02-10t/run.perl: drop Cwd dependency
Perl 5.8.8/5.10.0+ can use fchdir(), and we depend on 5.10.1+
2021-02-10t/run.perl: fix for >128 tests
We need to explicitly close the write-end of the pipe in workers to ensure they don't prevent each other from seeing EOF. Also, make a note to keep using the pipe for now since Linux <3.14 had broken read(2) semantics when file descriptions are shared across threads/processes.
2021-01-26use defined-or in a few more places
Mainly around fork() calls, but some nearby places as well.
2021-01-01update copyrights for 2021
Using "make update-copyrights" after setting GNULIB_PATH in my config.mak
2021-01-01t/run: avoid uninitialized var on incomplete test
Diagnosing an occasional FIFO failure in t/lei_to_mail.t...
2020-09-02t/run: Perl future proofing
Bareword file handles outside of STD(IN|OUT|ERR) seem to be on the chopping block for Perl 8. We'll also "use v5.10.1" to guard against future incompatibilities.
2020-08-29tests: check-run: fixup un-squashed simplification
Link: https://public-inbox.org/meta/20200828221803.GA89978@dcvr/
2020-08-28tests: check-run: show skipped tests
We'll deduplicate redundant lines and show counts of skipped tests to ensure it's easy to notice if something is unexpectedly skipped.
2020-06-30t/run: show unexpected output lines in logs
This will help us catch warnings in new code and notice inadvertantly skipped tests.
2020-04-09tests: document run_mode=1 as not implemented
It was implemented at some point, but it was more things to support and the worst of both worlds: both unrealistic compared to real-world use and slower than run_mode=2. Noticed while looking for speling erorrs.
2020-02-06treewide: run update-copyrights from gnulib for 2019
I didn't wait until September to do it, this year!
2019-12-19t/run.perl: to avoid repeated process spawning for *.t
Spawning a new Perl interpreter for every test case means Perl has to reparse and recompile every single file it needs, costing us performance and development time. Now that we've modified our code to avoid global state, we can preload everything we need. The new "check-run" test target is now 20-30% faster than the original "check" target.