I have a (database) test suite that executes a shell script in the background to create a database lock that I can check on, like
--8<--- use Test::More; : ok (1, "-- SELECT WITH WARNINGS"); ok ($dbh->disconnect, "disconnect"); my $pid; unless ($pid = fork ()) { qx{echo "xlock xx; !sleep 5;" | env UNIFY=$ENV{UNIFY} DBPATH=$ENV{DBPATH} SQL -q >/dev/null 2>&1}; exit 0; } sleep 1; ok ($dbh = DBI->connect ($dbname, undef, "", { RaiseError => 1, PrintError => 1, PrintWarn => 0, AutoCommit => 0, ChopBlanks => 1, uni_verbose => 0, uni_scanlevel => 6, }), "connect with attributes"); ok ($sth = $dbh->prepare ("select xl, xc from xx where xs = ?"), "sel prepare"); ok ($sth->execute (1), "execute 1"); is ($sth->state, "", "state method"); ok ($ref = $sth->fetchrow_arrayref, "fetchrow_arrayref"); is ($sth->state, "01U00", "state method"); is ("@$ref", "1001, 1", "fr_ar values"); ok ($sth->finish, "finish"); waitpid $pid, 0; : done_testing; -->8--- resulting in t/00-pod.t ........... ok t/00-podc.t .......... ok t/01-base.t .......... ok t/02-connect.t ....... ok t/03-general.t ....... ok t/10-dbi-drv.t ....... ok t/11-dbi-dbh.t ....... ok t/12-dbi-sth.t ....... ok t/15-uni-fail.t ...... ok t/20-uni-basic.t ..... All 366 subtests passed t/21-uni-regex.t ..... All 18 subtests passed t/24-text.t .......... ok t/25-binary.t ........ ok t/26-uni-multiarg.t .. ok t/27-uni-max.t ....... # To disable future max tests: setenv DBD_UNIFY_SKIP_27 1 t/27-uni-max.t ....... ok t/30-reconnect.t ..... ok t/40-info.t .......... ok t/50-trace.t ......... ok t/99-done.t .......... ok Test Summary Report ------------------- t/20-uni-basic.t (Wstat: 139 Tests: 366 Failed: 0) Non-zero wait status: 139 t/21-uni-regex.t (Wstat: 139 Tests: 18 Failed: 0) Non-zero wait status: 139 Files=19, Tests=3658, 35 wallclock secs ( 1.04 usr 0.15 sys + 19.64 cusr 4.01 csys = 24.84 CPU) Result: FAIL Failed 2/19 test programs. 0/3658 subtests failed. Everything passes and still the final result is FAIL Running t/22 with prove: prove -vbw t/21-uni-regex.t t/21-uni-regex.t .. ok 1 - connect with attributes ok 2 - prepare equal ok 3 - execute equal ok 4 - fetch equal ok 5 - finish equal ok 6 - prepare like ok 7 - execute like ok 8 - fetch like ok 9 - finish like ok 10 - prepare reglike ok 11 - execute reglike ok 12 - fetch reglike ok 13 - finish reglike ok 14 - prepare shlike ok 15 - execute shlike ok 16 - fetch shlike ok 17 - finish shlike ok 18 - disconnect 1..18 ok All tests successful. Files=1, Tests=18, 1 wallclock secs ( 0.07 usr 0.02 sys + 0.14 cusr 0.06 csys = 0.29 CPU) Result: PASS where I see no indications of me using subtests, which I don't do -- H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/ using 5.00307 through 5.14 and porting perl5.15.x on HP-UX 10.20, 11.00, 11.11, 11.23 and 11.31, OpenSuSE 10.1, 11.0 .. 11.4 and AIX 5.2 and 5.3. http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/ http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/