Skip to content

Proposal for Test Updating Project: dist/IO/t/*.t #22617

Open
@jkeenan

Description

@jkeenan

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 either Test::More or the core distribution's own t/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 coded print ok or print not ok statements.

$ ack -L '^use Test::More' ../dist/IO/t/*.t | xargs ack -L 'test\.pl' | xargs ls |sort
../dist/IO/t/io_const.t
../dist/IO/t/io_dup.t
../dist/IO/t/io_pipe.t
../dist/IO/t/io_poll.t
../dist/IO/t/io_sel.t
../dist/IO/t/io_sock.t
../dist/IO/t/io_tell.t
../dist/IO/t/io_unix.t

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 @tonycoz

Once we've handled any objections we'll make a more formal call for volunteers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dist-IOissues in the dual-life blead-first IO distribution

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions