From dbd4a5a3b7265e3292286f320ea53d048c80f307 Mon Sep 17 00:00:00 2001 From: Jacob Bachmeyer Date: Thu, 20 May 2021 17:00:17 -0500 Subject: Ensure that PR42399 regression test produces results --- ChangeLog | 16 +++++++++++----- .../nested/testsuite/bug.test/pr42399-sub.exp | 3 ++- testsuite/runtest.main/pr42399.exp | 10 ++++++++-- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3434ea8..e822401 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,22 +1,28 @@ 2021-05-20 Jacob Bachmeyer + * dejagnu: Search for a POSIX Awk and validate that at least a + simple Awk program actually works. + * testsuite/launcher.all/command.exp: Add tests for error produced + when no Awk is found and a help message is requested. + * lib/dejagnu.exp: Avoid reporting next test as UNRESOLVED when reporting error due to missing size(1) while loading file. * testsuite/lib/runtest.exp (runtest_copy_nested_testsuite_log): New procedure. Dumps log from nested run into main test log. + * testsuite/runtest.main/pr42399.exp (test_pr42399): Revise to + ensure that a failure to produce any output at all in the inner + test will be detected. This was discovered on Solaris 10. + * testsuite/runtest.main/stats.exp: Copy stat.log from nested testsuite run to the main test log upon test failure. * testsuite/runtest.main/nested/testsuite/stat.test/unit-sub.exp: Explicitly pass /dev/null to unit-sub.awk because /usr/bin/awk on Solaris 10 does not seem to recognize assignment to ARGV. - - * dejagnu: Search for a POSIX Awk and validate that at least a - simple Awk program actually works. - * testsuite/launcher.all/command.exp: Add tests for error produced - when no Awk is found and a help message is requested. + * testsuite/runtest.main/nested/testsuite/bug.test/pr42399-sub.exp: + Likewise. 2021-05-18 Jacob Bachmeyer diff --git a/testsuite/runtest.main/nested/testsuite/bug.test/pr42399-sub.exp b/testsuite/runtest.main/nested/testsuite/bug.test/pr42399-sub.exp index 331e043..d3f2b32 100644 --- a/testsuite/runtest.main/nested/testsuite/bug.test/pr42399-sub.exp +++ b/testsuite/runtest.main/nested/testsuite/bug.test/pr42399-sub.exp @@ -21,5 +21,6 @@ load_lib dejagnu.exp if {[info exists N]} { - host_execute [which awk] -f [testsuite file -source -test pr42399.awk] N=$N + host_execute [which awk] -f [testsuite file -source -test pr42399.awk] \ + N=$N /dev/null } diff --git a/testsuite/runtest.main/pr42399.exp b/testsuite/runtest.main/pr42399.exp index 1782231..f1d3abe 100644 --- a/testsuite/runtest.main/pr42399.exp +++ b/testsuite/runtest.main/pr42399.exp @@ -33,7 +33,7 @@ proc test_pr42399 {} { foreach test_count {5 5000} { set result pass - set failures [list] + set eof_reached 0 set want_num 1 set cmd_args [list --local_init nested-init.exp --tool bug \ -a pr42399-sub.exp N=$test_count] @@ -49,9 +49,15 @@ proc test_pr42399 {} { exp_continue } eof { - $result "PR42399 test with $test_count inner tests" + set eof_reached 1 } } + # Were any results at all produced? + if { $want_num == 1 } { set result unresolved } + # Did Expect report eof? + if { ! $eof_reached } { set result unresolved } + # emit test result + $result "PR42399 test with $test_count inner tests" } } -- cgit v1.1