From: Andrew Cagney <cagney@gnu.org>
To: gdb-patches@sources.redhat.com
Subject: Re: [RFA] testsuite/gdb.base/maint.exp: Add relative pathname test and fix test for Cygwin
Date: Wed, 09 Feb 2005 14:54:00 -0000 [thread overview]
Message-ID: <420A1A04.9010106@gnu.org> (raw)
In-Reply-To: <20050203125811.GA19985@cygbert.vinschen.de>
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
next parent reply other threads:[~2005-02-09 14:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20050203125811.GA19985@cygbert.vinschen.de>
2005-02-09 14:54 ` Andrew Cagney [this message]
2005-02-09 17:02 ` Corinna Vinschen
2005-02-09 17:09 ` Andrew Cagney
2005-02-09 18:37 ` 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=420A1A04.9010106@gnu.org \
--to=cagney@gnu.org \
--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