From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24265 invoked by alias); 9 Feb 2005 14:12:08 -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 23694 invoked from network); 9 Feb 2005 14:11:55 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 9 Feb 2005 14:11:55 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j19EBthA022982 for ; Wed, 9 Feb 2005 09:11:55 -0500 Received: from localhost.redhat.com (vpn50-64.rdu.redhat.com [172.16.50.64]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j19EBsO25542; Wed, 9 Feb 2005 09:11:54 -0500 Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 41F1D7D79; Wed, 9 Feb 2005 09:11:18 -0500 (EST) Message-ID: <420A1A04.9010106@gnu.org> Date: Wed, 09 Feb 2005 14:54:00 -0000 From: Andrew Cagney User-Agent: Mozilla Thunderbird 0.8 (X11/20041020) MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: Re: [RFA] testsuite/gdb.base/maint.exp: Add relative pathname test and fix test for Cygwin References: <20050203125811.GA19985@cygbert.vinschen.de> In-Reply-To: <20050203125811.GA19985@cygbert.vinschen.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2005-02/txt/msg00052.txt.bz2 Corinna Vinschen wrote: > Hi, > > this patch adds a new test, which tests for the path problem described > and patched in my posting to this list from 2005-01-24: > > http://sources.redhat.com/ml/gdb-patches/2005-01/msg00234.html > > which still awaits approval. > > The below patch adds a test for the added ability to handle relativ paths > to object files. It FAILs on current GDB but it PASSes with my patch to > symmisc.c. Looks good, just some refinement before committing ... > This patch also tweaks maint.exp to get useful results also on Cygwin: > > - So far, the "help maint dump-me" and "maint dump-me" tests are > marked XFAIL on Cygwin. That's not necessary anymore, so I removed > the XFAIL settings. Ya! An audit of the entire testsuite/ pulling any other similar XFAILs would be treated as obvious ;-) > - The timeout value is raised, because printing all the symbols and > statistical information about Cygwin and Windows libraries takes a lot > of time. .... should be added here as a comment and made cygwin only. > > +set oldtimeout $timeout > +set timeout [expr $timeout + 500] > > send_gdb "maint print statistics\n" > gdb_expect { > @@ -316,6 +318,49 @@ gdb_expect { > timeout { fail "(timeout) maint print msymbols" } > } > > +# Check that maint print msymbols allows relative pathnames > +set mydir [pwd] Can you change these new tests to use gdb_test_multiple, unlike gdb_send/gdb_expect, that handles internal errors, timeouts, and similar directly so is much more robust. For indentation, I'd just use the style ..... { commands } (yes I know the existing file is totally inconsistent in both those regards, lets get the new code right :-) > +send_gdb "cd ${objdir}\n" > +gdb_expect { > + -re "Working directory ${objdir}\..*$gdb_prompt $" \ > + { pass "cd into objdir" } > + -re ".*$gdb_prompt $" \ > + { fail "cd into objdir" } > + timeout { fail "(timeout) cd into objdir" } > +} > +send_gdb "maint print msymbols msymbols_output ${subdir}/${testfile}\n" > +gdb_expect { > + -re "^maint print msymbols msymbols_output \[^\n\]*\r\n$gdb_prompt $"\ > + { > + send_gdb "shell ls msymbols_output\n" > + gdb_expect { > + -re "msymbols_output\r\n$gdb_prompt $"\ > + { > + send_gdb "shell grep factorial msymbols_output\n" > + gdb_expect { > + -re "\\\[ *$decimal\\\] T\[ \t\]+$hex factorial.*$gdb_prompt $"\ > + { pass "maint print msymbols rel-path" } > + -re ".*$gdb_prompt $" { fail "maint print msymbols rel-path" } > + timeout { fail "(timeout) maint print msymbols rel-path" } > + } > + gdb_test "shell rm -f msymbols_output" "" > + > + } > + -re ".*$gdb_prompt $" { fail "maint print msymbols rel-path" } > + timeout { fail "(timeout) maint print msymbols rel-path" } > + } > + } > + -re ".*$gdb_prompt $" { fail "maint print msymbols rel-path" } > + timeout { fail "(timeout) maint print msymbols rel-path" } > + } > +send_gdb "cd ${mydir}\n" > +gdb_expect { > + -re "Working directory ${mydir}\..*$gdb_prompt $" \ > + { pass "cd into objdir" } > + -re ".*$gdb_prompt $" \ > + { fail "cd into objdir" } > + timeout { fail "(timeout) cd into objdir" } > +} > > send_gdb "maint print symbols\n" > gdb_expect { > @@ -421,6 +466,7 @@ gdb_expect { > > # Test for new option: DATA section flag > # If your text section is tagged DATA, xfail this test. Again with this ... > - The "maint info sections DATA" test is marked for XFAIL on Cygwin, > because Windows has text sections marked DATA. Andrew