From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1954 invoked by alias); 18 Sep 2002 11:22:06 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 1945 invoked from network); 18 Sep 2002 11:22:05 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 18 Sep 2002 11:22:05 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu-dmz.redhat.com [172.16.52.200]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id g8IB4ui18213 for ; Wed, 18 Sep 2002 07:04:56 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id g8IBM3x06340 for ; Wed, 18 Sep 2002 07:22:03 -0400 Received: from cygbert.vinschen.de (vpn50-15.rdu.redhat.com [172.16.50.15]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id g8IBM1C16663 for ; Wed, 18 Sep 2002 04:22:01 -0700 Received: (from corinna@localhost) by cygbert.vinschen.de (8.11.6/8.9.3/Linux sendmail 8.9.3) id g8IBLu630009 for gdb-patches@sources.redhat.com; Wed, 18 Sep 2002 13:21:56 +0200 Date: Wed, 18 Sep 2002 04:22:00 -0000 From: Corinna Vinschen To: gdb-patches@sources.redhat.com Subject: [RFA] testsuite/gdb.base/ending-run.exp Message-ID: <20020918132156.Z29920@cygbert.vinschen.de> Reply-To: gdb-patches@sources.redhat.com Mail-Followup-To: gdb-patches@sources.redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.22.1i X-SW-Source: 2002-09/txt/msg00382.txt.bz2 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