Subject: bug#47795: utils.test fails intermittently

From: Rainer Orth <[email-masked]>
Date: Thu, 15 Apr 2021 14:27:44 +0200

I just noticed that one part of the runtest testsuite fails
intermittently on both Solaris 10 and 11 on the 1.6.3 branch.  It's easy
to miss because it only manifests itself in runtest.{sum,log} as

[...]
PASS: testsuite file creates new implied object directory
ERROR: /vol/src/gnu/dejagnu/dejagnu-1.6.3-branch/local/testsuite/runtest.libs/utils.test did not complete

and

                === runtest Summary ===
 
-# of expected passes           268
+# of expected passes           294

Unless you know how many passes to expect, you likely miss the problem.

Even when running runtest -v -v instead, neither the runtest output

@@ -157,8 +157,7 @@
 Processing test /vol/src/gnu/dejagnu/dejagnu-1.6.3-branch/local/testsuite/runtest.libs/testsuite_file.test
 Running /vol/src/gnu/dejagnu/dejagnu-1.6.3-branch/local/testsuite/runtest.libs/utils.test ...
 Processing test /vol/src/gnu/dejagnu/dejagnu-1.6.3-branch/local/testsuite/runtest.libs/utils.test
-WARNED: diff1.txt doesn't exist
-
+ERROR: /vol/src/gnu/dejagnu/dejagnu-1.6.3-branch/local/testsuite/runtest.libs/utils.test did not complete

nor runtest.log show much:

Running /vol/src/gnu/dejagnu/dejagnu-1.6.3-branch/local/testsuite/runtest.libs/utils.test ...
Processing test /vol/src/gnu/dejagnu/dejagnu-1.6.3-branch/local/testsuite/runtest.libs/utils.test

interp delete test_case
interp create test_case
interp create test_case
expect1.30> test_case eval {foreach { n v }}  [list [array get default_vars]] {{ set $n $v }}
test_case eval {foreach { n v }}  [list [array get default_vars]] {{ set $n $v }}
test_case^M^M
expect1.31> test_case eval source /vol/src/gnu/dejagnu/dejagnu-1.6.3-branch/local/testsuite/runtest.libs/utils.test
test_case eval source /vol/src/gnu/dejagnu/dejagnu-1.6.3-branch/local/testsuite/runtest.libs/utils.test
expect1.32> ERROR: /vol/src/gnu/dejagnu/dejagnu-1.6.3-branch/local/testsuite/runtest.libs/utils.test did not complete

The test does succeed when running

runtest --tool runtest

in a row about 2 out of 10 times.

I'm a bit at a loss how to investigate this further.