[replying on the mailing list, with Ben's permission to quote his
initial off-list msg]

On Fri, 2014-10-10 at 10:34 +1100, Ben Elliston wrote:
> Hi David,
> 
> You're right that it looks like it should be full_buffer, not
> buffer_full.  What happens if you fix that?

Hacking in a "-d" into runtest's invocation of expect, I see this in the
log (the 1st time through):

  expect: does "" (spawn_id exp0) match glob pattern "buffer_full"? no

i.e. it does indeed treat "buffer_full" as a glob pattern, rather than a
keyword.

Fixing the spelling to "full_buffer" doesn't fix the issue (log with -d
attached)

However, moving the "expect_before" line to *after* the "spawn"
invocation does: is the "expect_before" line too early?

My current belief here is that it's picking up the wrong spawn:
"spawn_id exp0" doesn't seem to be the right thing for it to be
listening on (am I right in thinking that's the "default" stdin/stout,
rather than the not-yet-spawned program?)

Have been attempting to come up with a more minimal reproducer, but
failing so far - some kind of heisenbug timing needed to expose this
issue, perhaps?  Though I reliably hit it with my current setup, with:
  make check-gcc check-jit -j2

[my copy of "Exploring Expect" is due for delivery at some point today,
so may have more conceptual grounding in this in a day
or so].

Thanks
Dave

Test Run By david on Fri Oct 10 07:49:20 2014
Native configuration is x86_64-unknown-linux-gnu

		=== jit tests ===

trap: setting up signal 15 ("SIGTERM")
trap: setting up signal 2 ("SIGINT")
trap: setting up signal 3 ("SIGQUIT")
Schedule of variations:
    unix

Running target unix
Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target.
Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
Using /home/david/coding-3/gcc-build-jit/test/experiment/src/gcc/testsuite/config/default.exp as tool-and-target-specific interface file.
Running /home/david/coding-3/gcc-build-jit/test/experiment/src/gcc/testsuite/jit.dg/jit.exp ...
Executing on host: /home/david/coding-3/gcc-build-jit/test/experiment/x86_64-unknown-linux-gnu/build/gcc/xgcc -B/home/david/coding-3/gcc-build-jit/test/experiment/x86_64-unknown-linux-gnu/build/gcc/ /home/david/coding-3/gcc-build-jit/test/experiment/src/gcc/testsuite/../jit/docs/examples/install-hello-world.c  -fno-diagnostics-show-caret -fdiagnostics-color=never   -I/home/david/coding-3/gcc-build-jit/test/experiment/src/gcc/testsuite/../jit -lgccjit -g -Wall -Werror -Wl,--export-dynamic   -o install-hello-world.exe    (timeout = 300)
spawn -ignore SIGHUP /home/david/coding-3/gcc-build-jit/test/experiment/x86_64-unknown-linux-gnu/build/gcc/xgcc -B/home/david/coding-3/gcc-build-jit/test/experiment/x86_64-unknown-linux-gnu/build/gcc/ /home/david/coding-3/gcc-build-jit/test/experiment/src/gcc/testsuite/../jit/docs/examples/install-hello-world.c -fno-diagnostics-show-caret -fdiagnostics-color=never -I/home/david/coding-3/gcc-build-jit/test/experiment/src/gcc/testsuite/../jit -lgccjit -g -Wall -Werror -Wl,--export-dynamic -o install-hello-world.exe
parent: waiting for sync byte
parent: telling child to go ahead
parent: now unsynchronized from child
spawn: returns {41044}
Gate keeper glob pattern for '.+' is ''. Not usable, disabling the performance booster.

expect: does "" (spawn_id exp7) match regular expression ".+"? (No Gate, RE only) gate=yes re=no
expect: read eof
expect: set expect_out(spawn_id) "exp7"
expect: set expect_out(buffer) ""
PASS: /home/david/coding-3/gcc-build-jit/test/experiment/src/gcc/testsuite/../jit/docs/examples/install-hello-world.c, initial compilation
LD_LIBRARY_PATH=/home/david/coding-3/gcc-build-jit/test/experiment/x86_64-unknown-linux-gnu/build/gcc/testsuite/jit/../../:/home/david/coding/gcc-python/gcc-build-new-cloog/dep-prefix/lib:/home/david/coding/gcc-python/gcc-build-new-cloog/dep-prefix/lib:
LD_RUN_PATH=/home/david/coding-3/gcc-build-jit/test/experiment/x86_64-unknown-linux-gnu/build/gcc/testsuite/jit/../../
SHLIB_PATH=/home/david/coding-3/gcc-build-jit/test/experiment/x86_64-unknown-linux-gnu/build/gcc/testsuite/jit/../../
LD_LIBRARY_PATH_32=/home/david/coding-3/gcc-build-jit/test/experiment/x86_64-unknown-linux-gnu/build/gcc/testsuite/jit/../../:/home/david/coding/gcc-python/gcc-build-new-cloog/dep-prefix/lib:/home/david/coding/gcc-python/gcc-build-new-cloog/dep-prefix/lib:
LD_LIBRARY_PATH_64=/home/david/coding-3/gcc-build-jit/test/experiment/x86_64-unknown-linux-gnu/build/gcc/testsuite/jit/../../:/home/david/coding/gcc-python/gcc-build-new-cloog/dep-prefix/lib:/home/david/coding/gcc-python/gcc-build-new-cloog/dep-prefix/lib:
DYLD_LIBRARY_PATH=/home/david/coding-3/gcc-build-jit/test/experiment/x86_64-unknown-linux-gnu/build/gcc/testsuite/jit/../../
PASS: got here jit.exp:001
PASS: output_file is install-hello-world.exe
PASS: got here jit.exp:002 (about to call host_execute)
PASS: got here dejagnu.exp:host_execute: 001
PASS: got here dejagnu.exp:host_execute: about to reach expect_before buffer_full
PASS: got here dejagnu.exp:host_execute: after expect_before buffer_full
PASS: got here dejagnu.exp:host_execute: 004
PASS: got here dejagnu.exp:host_execute: about to spawn
parent: waiting for sync byte
parent: telling child to go ahead
parent: now unsynchronized from child
spawn: returns {41070}
PASS: got here dejagnu.exp:host_execute: about to parse child output
Gate keeper glob pattern for '^[^
]*[0-9][0-9]:..:..:[- A-Za-z0-9.;"_:'`()!#=+?&*]*
' is '*:??:??:*
'. Activating booster.
Gate keeper glob pattern for '^[^
]*	NOTE:[- A-Za-z0-9.;"_:'`()!#=+?&*]*' is '*	NOTE:*'. Activating booster.
Gate keeper glob pattern for '^[^
]*	PASSED:[- A-Za-z0-9.;"_:'`()!#=+?&*]*' is '*	PASSED:*'. Activating booster.
Gate keeper glob pattern for '^[^
]*	FAILED:[- A-Za-z0-9.;"_:'`()!#=+?&*]*' is '*	FAILED:*'. Activating booster.
Gate keeper glob pattern for '^[^
]*	UNTESTED:[- A-Za-z0-9.;"_:'`()!#=+?&*]*' is '*	UNTESTED:*'. Activating booster.
Gate keeper glob pattern for '^[^
]*	UNRESOLVED:[- A-Za-z0-9.;"_:'`()!#=+?&*]*' is '*	UNRESOLVED:*'. Activating booster.
Gate keeper glob pattern for '^Totals' is 'Totals'. Activating booster.
Gate keeper glob pattern for '^[^
]*
' is '*
'. Activating booster.

expect: does "" (spawn_id exp0) match full buffer full_buffer? no

expect: does "" (spawn_id exp7) match regular expression "^[^\r\n]*[0-9][0-9]:..:..:[- A-Za-z0-9.;"_:'`()!#=+?&*]*\r\n"? Gate "*:??:??:*\r\n"? gate=no
"^[^\r\n]*\tNOTE:[- A-Za-z0-9.;"_:'`()!#=+?&*]*"? Gate "*\tNOTE:*"? gate=no
"^[^\r\n]*\tPASSED:[- A-Za-z0-9.;"_:'`()!#=+?&*]*"? Gate "*\tPASSED:*"? gate=no
"^[^\r\n]*\tFAILED:[- A-Za-z0-9.;"_:'`()!#=+?&*]*"? Gate "*\tFAILED:*"? gate=no
"^[^\r\n]*\tUNTESTED:[- A-Za-z0-9.;"_:'`()!#=+?&*]*"? Gate "*\tUNTESTED:*"? gate=no
"^[^\r\n]*\tUNRESOLVED:[- A-Za-z0-9.;"_:'`()!#=+?&*]*"? Gate "*\tUNRESOLVED:*"? gate=no
"^Totals"? Gate "Totals"? gate=no
"^[^\r\n]*\r\n"? Gate "*\r\n"? gate=no
expect: read eof
expect: set expect_out(spawn_id) "exp0"
expect: set expect_out(buffer) ""
PASS: got here dejagnu.exp:host_execute: 005
PASS: got here dejagnu.exp:host_execute: about to return
PASS: got here
PASS: ../jit/docs/examples/install-hello-world.c (test for excess errors)
Executing on host: /home/david/coding-3/gcc-build-jit/test/experiment/x86_64-unknown-linux-gnu/build/gcc/xgcc -B/home/david/coding-3/gcc-build-jit/test/experiment/x86_64-unknown-linux-gnu/build/gcc/ /home/david/coding-3/gcc-build-jit/test/experiment/src/gcc/testsuite/../jit/docs/examples/tut01-square.c  -fno-diagnostics-show-caret -fdiagnostics-color=never   -I/home/david/coding-3/gcc-build-jit/test/experiment/src/gcc/testsuite/../jit -lgccjit -g -Wall -Werror -Wl,--export-dynamic   -o tut01-square.exe    (timeout = 300)
spawn -ignore SIGHUP /home/david/coding-3/gcc-build-jit/test/experiment/x86_64-unknown-linux-gnu/build/gcc/xgcc -B/home/david/coding-3/gcc-build-jit/test/experiment/x86_64-unknown-linux-gnu/build/gcc/ /home/david/coding-3/gcc-build-jit/test/experiment/src/gcc/testsuite/../jit/docs/examples/tut01-square.c -fno-diagnostics-show-caret -fdiagnostics-color=never -I/home/david/coding-3/gcc-build-jit/test/experiment/src/gcc/testsuite/../jit -lgccjit -g -Wall -Werror -Wl,--export-dynamic -o tut01-square.exe
parent: waiting for sync byte
parent: telling child to go ahead
parent: now unsynchronized from child
spawn: returns {41074}
Gate keeper glob pattern for '.+' is ''. Not usable, disabling the performance booster.

expect: does "" (spawn_id exp8) match regular expression ".+"? (No Gate, RE only) gate=yes re=no
expect: read eof
expect: set expect_out(spawn_id) "exp8"
expect: set expect_out(buffer) ""
PASS: /home/david/coding-3/gcc-build-jit/test/experiment/src/gcc/testsuite/../jit/docs/examples/tut01-square.c, initial compilation
LD_LIBRARY_PATH=/home/david/coding-3/gcc-build-jit/test/experiment/x86_64-unknown-linux-gnu/build/gcc/testsuite/jit/../../:/home/david/coding/gcc-python/gcc-build-new-cloog/dep-prefix/lib:/home/david/coding/gcc-python/gcc-build-new-cloog/dep-prefix/lib:
LD_RUN_PATH=/home/david/coding-3/gcc-build-jit/test/experiment/x86_64-unknown-linux-gnu/build/gcc/testsuite/jit/../../
SHLIB_PATH=/home/david/coding-3/gcc-build-jit/test/experiment/x86_64-unknown-linux-gnu/build/gcc/testsuite/jit/../../
LD_LIBRARY_PATH_32=/home/david/coding-3/gcc-build-jit/test/experiment/x86_64-unknown-linux-gnu/build/gcc/testsuite/jit/../../:/home/david/coding/gcc-python/gcc-build-new-cloog/dep-prefix/lib:/home/david/coding/gcc-python/gcc-build-new-cloog/dep-prefix/lib:
LD_LIBRARY_PATH_64=/home/david/coding-3/gcc-build-jit/test/experiment/x86_64-unknown-linux-gnu/build/gcc/testsuite/jit/../../:/home/david/coding/gcc-python/gcc-build-new-cloog/dep-prefix/lib:/home/david/coding/gcc-python/gcc-build-new-cloog/dep-prefix/lib:
DYLD_LIBRARY_PATH=/home/david/coding-3/gcc-build-jit/test/experiment/x86_64-unknown-linux-gnu/build/gcc/testsuite/jit/../../
PASS: got here jit.exp:001
PASS: output_file is tut01-square.exe
PASS: got here jit.exp:002 (about to call host_execute)
PASS: got here dejagnu.exp:host_execute: 001
PASS: got here dejagnu.exp:host_execute: about to reach expect_before buffer_full
expect: spawn id exp0 not open
    while executing
"expect_before full_buffer { perror "Buffer full" }"
    (procedure "host_execute" line 28)
    invoked from within
"host_execute ./$output_file"
    (procedure "jit-dg-test" line 69)
    invoked from within
"${tool}-dg-test $prog [lindex ${dg-do-what} 0] "$tool_flags ${dg-extra-tool-flags}""
    (procedure "dg-test" line 115)
    invoked from within
"dg-test $testcase $flags ${default-extra-flags}"
    (procedure "dg-runtest" line 10)
    invoked from within
"dg-runtest $tests "" $DEFAULT_CFLAGS"
    (file "/home/david/coding-3/gcc-build-jit/test/experiment/src/gcc/testsuite/jit.dg/jit.exp" line 140)
    invoked from within
"source /home/david/coding-3/gcc-build-jit/test/experiment/src/gcc/testsuite/jit.dg/jit.exp"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 source $test_file_name"
    (procedure "runtest" line 22)
    invoked from within
"runtest $test_name"
    ("foreach" body line 42)
    invoked from within
"foreach test_name [lsort [find ${dir} *.exp]] {
			if { ${test_name} == "" } {
			    continue
			}
			# Ignore this one if asked to.
			if { ${ignore..."
    ("foreach" body line 54)
    invoked from within
"foreach dir "${test_top_dirs}" {
		if { ${dir} != ${srcdir} } {
		    # Ignore this directory if is a directory to be
		    # ignored.
		    if {[info..."
    ("foreach" body line 121)
    invoked from within
"foreach pass $multipass {

	# multipass_name is set for `record_test' to use (see framework.exp).
	if { [lindex $pass 0] != "" } {
	    set multipass_..."
    ("foreach" body line 51)
    invoked from within
"foreach current_target $target_list {
    verbose "target is $current_target"
    set current_target_name $current_target
    set tlist [split $curren..."
    (file "/usr/share/dejagnu/runtest.exp" line 1606)
 1  exit 1
 2    rename _close.pre_expect close
_______________________________________________
DejaGnu mailing list
DejaGnu@gnu.org
https://lists.gnu.org/mailman/listinfo/dejagnu

Reply via email to