This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: RFC: Testsuite patches, a few comments and questions...


> gdb.base/recurse.exp		19/19 tests pass

I think this test should be enabled per default for all targets, as it
has uncovered regressions in the past during my local tests. The test is not
target specific, and any fails indicate a problem with GDB on that target.

> I don't understand the following code from pthreads.exp:
> 
> proc test_startup {} {
>     global srcdir srcfile gdb_prompt expect_out
>     global horiz
>     global main_id thread1_id thread2_id
> 
>     # We should be able to do an info threads before starting any others.
>     send_gdb "info threads\n"
>     gdb_expect {
>         -re ".*Thread.*LWP.*main.*$gdb_prompt $" {
>             pass "info threads"
>         }
>         -re "\r\n$gdb_prompt $" {
>             pass "info threads"
>             setup_xfail "*-*-*"
>             fail "gdb does not support pthreads for this machine"
>             return 0
> ...
> 
> The last expect case is very odd.  It succeeds, sets up an xfail, fails and
> exits deliberately as it is starting the tests.  Why?  Is there some reason for
> this?

The rest of the test only makes sense for targets which have thread support.
So if GDB can't find an indication of multithread support, it will xfail
and give up testing.

Changing the expect sequence to

   -re ".*Thread.*(LWP|runnable).*main.*$gdb_prompt $" {

will enable the rest of the test on Linux (and produce two failures, at least
with my Debian version of Linux x86, where the main thread no longer runs due
to the conditional breakpoint in common_routine).

>         * testsuite/gdb.c++/overload.exp
>         (print foo_instance1.overload_args()):  Remove setup_xfail "*-*-*" 
>         on all tests (1-11 arguments).
>         (print foo_instance1.overload1arg()): Remove setup_xfail "*-*-*" 
>         on all tests (none, char, signed char, unsigned char, short, 
>         unsigned short, int, unsigned int, long, unsigned long, float
>         and double arguments).
> 
>         * testsuite/gdb.c++/virtfunc.exp
>         (print pAa->f()): Remove setup_xfail "*-*-*".
>         (print pDe->vg()): Remove setup_xfail "*-*-*".
>         (print pADe->vg()): Remove setup_xfail "*-*-*".
>         (print pDd->vg()): Remove setup_xfail "*-*-*".
>         (print pEe->vvb()): Remove setup_xfail "*-*-*".
>         (print pVb->vvb()): Remove setup_xfail "*-*-*".

Although Daniel Berlin objected to the removal of these xfails, I think they
should go away. Fails in the virtfunc test reflect reality, and they clearly
indicate that MI virtual function support is badly broken starting with
GDB 4.18. These tests should never have been xfailed in the first place...

-- 
Peter Schauer			pes@regent.e-technik.tu-muenchen.de

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]