Open jkeenan opened 1 month ago
Sounds good to me
Some of the tests use fork(), eg. io_sock.t, io_unix.t, and may not be convertible to Test::More.
Test2 has fork support. I'm unclear how much of it is in core now?
@jkeenan I'm interested in helping if y'all move ahead with it
The whole Test2 core suite is core now, however note that updates to the IO dist could complicate its dual-life CPAN release (which works on many versions where the Test2 suite is not yet core). Though I don't see any reason not to add that dependency if it's useful. (And Test2::IPC, which seems to be the necessary component here, has been core for a decent while, but I don't know if it works with Test::More.)
Test2::IPC does work for Test::More.
I suggest using Test2::V0 over Test::More for debugging, and for performance. However if the deps are a problem Test2::IPC + Test::More will work and are supported on perl versions that include Test2::IPC but not Test2::V0.
I'd like to propose a small project aimed at updating tests in the Perl core distribution. This proposal has two intended audiences:
Core committers and other veteran committers who might be able to tell us why we should not embark on this project.
First-time or new contributors who will actually execute the project as a series of pull requests to be reviewed by core committers.
The focus of the project will be the 8 test files found in
dist/IO/t
which do not use eitherTest::More
or the core distribution's ownt/test.pl
to generate TAP output. These test files, which date from the earliest days of Perl 5 (or possibly earlier), each generate output by using manually codedprint ok
orprint not ok
statements.Since it is cumbersome to include test descriptions (alternatively called 'names' or 'labels') in that approach, 7 of these 8 files have no descriptions whatsoever and the eighth has only a handful. So when a particular unit test fails, all we get is a number.
This is particularly annoying when one of these tests fails during smoke-testing (as
io_poll.t
did for me within the past week).A separate pull request should be prepared for each file (in part to encourage multiple participants in this project). The first commit in each p.r. should simply convert a given file to
use Test::More
without adding any new descriptions. The second commit should add the descriptions. In the course of preparing test descriptions participants will necessarily have to learn a lot about I/O operations whose fundamentals date back to the early days of Unix. (I myself have rarely written Perl code directly using these operations, much less testing them.)Core Committers: Is there any reason we should not convert these files to
Test::More
? @toddr @atoomic @ilmari @tonycozOnce we've handled any objections we'll make a more formal call for volunteers.