Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Corinna Vinschen <vinschen@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: [RFA] testsuite/gdb.base/ending-run.exp
Date: Wed, 18 Sep 2002 04:22:00 -0000	[thread overview]
Message-ID: <20020918132156.Z29920@cygbert.vinschen.de> (raw)

Hi,

I suggest the attached patch to ending-run.exp which fixes the following
problems:

- The "step out of main (status wrapper)" check tests only for
  __wrap_main but not for __wrap__main which is used in dejagnu's
  testglue.c when UNDERSOCRES is defined.

- The "step to end of run (status wrapper)" test expects not only
  the "EXIT code 0" but also a "Program exited normaly" string.
  That's not ok for targets which never actually exit but are just
  trapped in a special _exit() handler.

- Based on this, the expectation that the following "next" will print
  the string "The program is not being run" is plain wrong.  By adding
  a special case for these targets and setting the expected behaviour
  to XFAIL, these targets get a fair chance ;-)

Corinna

        * gdb.base/ending-run.exp: Fix expected string for _wrap_main to
        allow correct handling of #ifdef UNDERSCORES from dejagnu/testglue.c.
        Fix handling of "step to end of run" for embedded targets which
        never actually exit.

Index: gdb.base/ending-run.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/ending-run.exp,v
retrieving revision 1.16
diff -u -p -r1.16 ending-run.exp
--- gdb.base/ending-run.exp	19 Jul 2002 00:02:34 -0000	1.16
+++ gdb.base/ending-run.exp	18 Sep 2002 11:21:22 -0000
@@ -195,7 +195,7 @@ gdb_expect {
 	    -re ".*in.*\\\$START\\\$.*from.*dld.sl.*$gdb_prompt $" { 
 		pass "step out of main"
 	    }
-	    -re ".*in __wrap_main ().*$gdb_prompt $" {
+	    -re ".*in __wrap__?main ().*$gdb_prompt $" {
 		pass "step out of main (status wrapper)"
 	    }
             -re ".*$gdb_prompt $" { fail "step out of main (at end 2)" }
@@ -245,8 +245,12 @@ if {! [target_info exists use_gdb_stub]
 		# exit" message.
 		pass "step to end of run"
 	    }
-	    -re "Single.*EXIT code 0.*Program exited normally.*$gdb_prompt $" {
+	    -re "Single.*EXIT code 0\r\n.*Program exited normally.*$gdb_prompt $" {
 		pass "step to end of run (status wrapper)"
+	    }
+	    -re "Single.*EXIT code 0\r\n.*$gdb_prompt $" {
+		pass "step to end of run (status wrapper)"
+		setup_xfail "*-*-*"
 	    }
 	    -re ".*Single.*Program exited.*$gdb_prompt $" {
 		pass "step to end of run"


-- 
Corinna Vinschen
Cygwin Developer
Red Hat, Inc.
mailto:vinschen@redhat.com


             reply	other threads:[~2002-09-18 11:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-18  4:22 Corinna Vinschen [this message]
2002-09-18  8:46 ` Fernando Nasser
2002-09-18  9:12   ` Corinna Vinschen
2002-09-18  9:57     ` Fernando Nasser
2002-09-18 10:21       ` Corinna Vinschen

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=20020918132156.Z29920@cygbert.vinschen.de \
    --to=vinschen@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    /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