This is the mail archive of the gdb-prs@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

testsuite/1729: dump.exp:capture_value failure gets testsuite out-of-sync


>Number:         1729
>Category:       testsuite
>Synopsis:       dump.exp:capture_value failure gets testsuite out-of-sync
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unasigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Aug 01 15:58:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     ac131313@redhat.com
>Release:        2004-08-01
>Organization:
>Environment:
All (where dump.exp starts failing)
>Description:
The procedure capture_value (from dump.exp):

proc capture_value { expression } {
    global gdb_prompt
    global expect_out

    set output_string ""
    send_gdb "print ${expression}\n"
    gdb_expect {
	-re ".*\[\r\n\]+.\[0123456789\]+ = (\[^\r\n\]+).*$gdb_prompt $" {
	    set output_string $expect_out(1,string)
	}
	default {
	    fail "capture_value failed on $expression."
	}
    }
    return $output_string
}

in the default case, doesn't eat its output.  This results in the testsuite getting out-of-sync leading to cascading failures.  It needs to use gdb_test or gdb_test_multiple, the trick bit is making the test names unique.
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]