gdb/36: testsuite/gdb.base/exprs.exp loses synchronization
Fri Mar 9 12:08:00 GMT 2001

>Number:         36
>Category:       gdb
>Synopsis:       testsuite/gdb.base/exprs.exp loses synchronization
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 09 12:08:00 PST 2001
>Release:        cvs 2001-03-08
Solaris 2.6

In the section "test expressions with pointers out of range",
the test script says:

  send_gdb "print sizeof (long long) > sizeof(long)\n"
  gdb_expect {
    -re "\\$\[0-9\]* = $true" {
       set ok 1
       pass "sizeof (long long) > sizeof (long) (true)"

The regular expression does not capture $gdb_prompt.
This leads to intermittent failures of the next test:

  print sizeof (long long) > sizeof (long)^M
  $197 = 1^M
  (gdb) PASS: gdb.base/exprs.exp: sizeof (long long) > sizeof(long) (true)
  FAIL: gdb.base/exprs.exp: truncate (void*) 0x00000000ffffffff + 1
  warning: value truncated^M
  $198 = (void *) 0x0^M

The second test FAILs before its output comes back,
because it's getting the prompt from the first test.

Run this test on Solaris 2.5, 2.6, 2.7, and 2.8
multiple times (three times is good).  I think the failure
rate is >50% per trial.
Match up to "$gdb_prompt $" in the regular expressions.

More information about the Gdb-prs mailing list