use Test::More tests => 2; ok(1, "First test"); $pid = open( CHILD, "|-" ); $SIG{PIPE} = 'IGNORE'; if ($pid) { # parent print CHILD "test\n"; close CHILD; exit 0; } # child process ok(1, "Second test"); #### 1..2 ok 1 - First test ok 2 - Second test # Looks like you planned 2 tests but only ran 1. #### print "1..2\n"; print "ok 1 - First test\n"; $pid = open( CHILD, "|-" ); $SIG{PIPE} = 'IGNORE'; if ($pid) { # parent print CHILD "test\n"; close(CHILD); exit 0; } print "ok 2 - Second test\n"; #### # perl -MTest::Harness -e 'runtests("test_plain_fork.t", "test_more_fork.t")' test_plain_fork....ok test_more_fork.....ok 2/2# Looks like you planned 2 tests but only ran 1. test_more_fork.....dubious Test returned status 1 (wstat 256, 0x100) after all the subtests completed successfully Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- test_more_fork.t 1 256 2 0 0.00% ?? Failed 1/2 test scripts, 50.00% okay. 0/4 subtests failed, 100.00% okay.