This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: PATCH: clean up test suite debug format xfail stuff
- To: Jim Blandy <jimb at cygnus dot com>
- Subject: Re: PATCH: clean up test suite debug format xfail stuff
- From: Michael Snyder <msnyder at cygnus dot com>
- Date: Tue, 02 Oct 2001 13:30:24 -0700
- CC: gdb-patches at sources dot redhat dot com
- Organization: Red Hat
- References: <20011002194555.2F4485E9D8@zwingli.cygnus.com>
Jim Blandy wrote:
>
> (What a fine noun clause that is!)
>
> I've committed this change.
>
> 2001-10-02 Jim Blandy <jimb@redhat.com>
>
> * lib/gdb.exp (test_xfail_format): Simplify.
>
> * lib/gdb.exp (setup_xfail_format): Don't forget to put a `$' in
> front of the variable name `format'. Simplify `if'.
Thanks, Jim
>
> Index: gdb/testsuite/lib/gdb.exp
> ===================================================================
> RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v
> retrieving revision 1.13
> diff -c -r1.13 gdb.exp
> *** gdb/testsuite/lib/gdb.exp 2001/09/27 21:35:55 1.13
> --- gdb/testsuite/lib/gdb.exp 2001/10/02 19:32:01
> ***************
> *** 1417,1442 ****
> }
> }
>
> # Like setup_xfail, but takes the name of a debug format (DWARF 1,
> # COFF, stabs, etc). If that format matches the format that the
> # current test was compiled with, then the next test is expected to
> # fail for any target. Returns 1 if the next test or set of tests is
> # expected to fail, 0 otherwise (or if it is unknown). Must have
> # previously called get_debug_format.
> -
> - proc test_debug_format { format } {
> - global debug_format
> -
> - if [string match $debug_format $format] then {
> - return 1;
> - }
> - return 0
> - }
> -
> proc setup_xfail_format { format } {
> ! set ret [test_debug_format format];
>
> ! if [expr $ret != 0] then {
> setup_xfail "*-*-*"
> }
> return $ret;
> --- 1417,1444 ----
> }
> }
>
> + # Return true if FORMAT matches the debug format the current test was
> + # compiled with. FORMAT is a shell-style globbing pattern; it can use
> + # `*', `[...]', and so on.
> + #
> + # This function depends on variables set by `get_debug_format', above.
> +
> + proc test_debug_format {format} {
> + global debug_format
> +
> + return [expr [string match $format $debug_format] != 0]
> + }
> +
> # Like setup_xfail, but takes the name of a debug format (DWARF 1,
> # COFF, stabs, etc). If that format matches the format that the
> # current test was compiled with, then the next test is expected to
> # fail for any target. Returns 1 if the next test or set of tests is
> # expected to fail, 0 otherwise (or if it is unknown). Must have
> # previously called get_debug_format.
> proc setup_xfail_format { format } {
> ! set ret [test_debug_format $format];
>
> ! if {$ret} then {
> setup_xfail "*-*-*"
> }
> return $ret;