This is the mail archive of the gdb-patches@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]

Re: [Jim Blandy <jimb@redhat.com>] RFA: Check that `Local' is not in scope when it shouldn't be


On 20 Dec 2002 13:36:40 -0500, Jim Blandy <jimb@redhat.com> said:

> Ping on this test suite patch.

I'm confused: don't you want to do the first 'ptype Local' _before_
going up from foobar?  In which case your added test might as well
happen after you go up from foobar but before running to marker2.

Also, we're actually kfailing things now, though we weren't when you
first submitted the patch.  So if you could modify the patch to
actually call setup_kfail (which takes two arguments, the second one
of which is presumably "*-*-*"), I'd appreciate it.  What I would
recommend is to replace this

# setup_kfail "gdb/825"
gdb_test "ptype Local" "No symbol \"Local\" in current context.*" \
         "Local out of scope (gdb/825)"

with something like

gdb_send "ptype Local\n"
gdb_expect {
  -re "No symbol \"Local\" in current context.*" {
     setup_kfail "gdb/825" "*-*-*"
     pass "Local out of scope"
  }
  -re "(actual output)" {
     setup_kfail "gdb/825" "*-*-*"
     fail "Local out of scope"
  -re ".*$gdb_prompt $" {
     fail "Local out of scope
  }
  timeout {
    fail "(timeout) Local out of scope"
}

For "actual output", you could either have one block for each of the
outputs (pass or (k)fail) listed in the earlier "ptype Local" test, or
you can just have one test that unifies each of the earlier outputs;
whichever you think is easiest.

This assumes that you think that GDB never gets this right currently;
if you think that GDB sometimes does get it right, then don't put the
setup_kfail before the pass message.

Other than that, it looks good; I certainly like the basic idea.

Also, for what it's worth, I personally prefer diff -up to diff -c.

David Carlton
carlton@math.stanford.edu


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