Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: gdb-patches@sourceware.org
Subject: Testcase problem in chng-syms.exp
Date: Sat, 10 Mar 2007 00:22:00 -0000	[thread overview]
Message-ID: <200703100022.l2A0Mleb030342@d12av02.megacenter.de.ibm.com> (raw)

Hello,

I'm seeing failures in chng-sym.exp which appear to be test case bugs.

The output of GDB near the end of the test run is:

Executing on host: spu-gcc /home/uweigand/fsf/gdb-head/gdb/testsuite/gdb.base/chng-syms.c  -DVARIABLE=var2 -g  -lm   -o /home/uweig
and/fsf/gdb-head-build/gdb/testsuite/gdb.base/chng-syms    (timeout = 300)
run ^M
`/home/uweigand/fsf/gdb-head-build/gdb/testsuite/gdb.base/chng-syms' has changed; re-reading symbols.^M
Error in re-setting breakpoint 1:^M
No symbol "var1" in current context.^M
Starting program: /home/uweigand/fsf/gdb-head-build/gdb/testsuite/gdb.base/chng-syms ^M
^M
Program exited normally.^M
(gdb) FAIL: gdb.base/chng-syms.exp: running with invalidated bpt condition after executable changes

Now, the corresponding test case code reads:

    gdb_run_cmd
    gdb_expect {
        -re "Error in re-setting .*No symbol .var1..*Program exited normally.*$gdb_prompt $" {
            pass "running with invalidated bpt condition after executable changes"
        }
        -re "Error in re-setting .*No symbol .var1..*Breakpoint .*,( 0x.* in)? exit .*$gdb_prompt $" {
            pass "running with invalidated bpt condition after executable changes"
        }
        -re "$gdb_prompt $" {
            fail "running with invalidated bpt condition after executable changes"
        }
        timeout {
            fail "(timeout) running with invalidated bpt condition after executable changes"
        }
    }

So you'd expect that the output would match the first pattern, right?
However, it doesn't.  This appears to be caused by the implementation
of gdb_run_cmd, which ends in:

    send_gdb "run $args\n"
# This doesn't work quite right yet.
    gdb_expect 60 {
        -re "The program .* has been started already.*y or n. $" {
            send_gdb "y\n"
            exp_continue
        }
        -re "Starting program: \[^\r\n\]*" {}
    }

This means everything up to and including the line "Starting program: ..."
is swallowed up by this gdb_expect, and the second one in chng-syms.exp
does see the lines it is looking for any more.


Did I overlook anything here?  How can we best fix this?
I'd appreciate any suggestions ...

Thanks,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


             reply	other threads:[~2007-03-10  0:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-10  0:22 Ulrich Weigand [this message]
2007-03-16 15:33 ` [committed] " Ulrich Weigand
2007-03-16 15:39   ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200703100022.l2A0Mleb030342@d12av02.megacenter.de.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox