From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Snyder To: Jim Blandy Cc: gdb-patches@sources.redhat.com Subject: Re: PATCH: clean up test suite debug format xfail stuff Date: Tue, 02 Oct 2001 13:31:00 -0000 Message-id: <3BBA23E0.9B8AAB8D@cygnus.com> References: <20011002194555.2F4485E9D8@zwingli.cygnus.com> X-SW-Source: 2001-10/msg00035.html Jim Blandy wrote: > > (What a fine noun clause that is!) > > I've committed this change. > > 2001-10-02 Jim Blandy > > * 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;