This is the mail archive of the gdb-patches@sources.redhat.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]
Other format: [Raw text]

Re: [patch] Test scalar call/return/finish test - call-sc


> Joel, Jerome, AIX should have zero call-sc and structs failures (as 
> there is for PPC/elf).
> 
> committed,
> Andrew

> 2004-04-23  Andrew Cagney  <cagney@redhat.com>
> 
> 	* gdb.base/call-sc.exp: New test of scalar call/return values.
> 	* gdb.base/call-sc.c: Ditto.

I got a few failures...

                        === gdb Summary ===
        
        # of expected passes            141
        # of unexpected failures        12

The following FAILs seem to be caused by a problem in the test itself rather
than GDB.

        FAIL: gdb.base/call-sc.exp: ptype foo; call-sc-tc cha
        FAIL: gdb.base/call-sc.exp: ptype foo; call-sc-ts sho
        FAIL: gdb.base/call-sc.exp: ptype foo; call-sc-ti i
        FAIL: gdb.base/call-sc.exp: ptype foo; call-sc-tl lo
        FAIL: gdb.base/call-sc.exp: ptype foo; call-sc-tll lo
        FAIL: gdb.base/call-sc.exp: ptype foo; call-sc-tf float
        FAIL: gdb.base/call-sc.exp: ptype foo; call-sc-td double
        FAIL: gdb.base/call-sc.exp: ptype foo; call-sc-tld lo
        FAIL: gdb.base/call-sc.exp: ptype foo; call-sc-te e

Let's look at the first one, for instance:

        (gdb) ptype tc
        type = char
        (gdb) PASS: gdb.base/call-sc.exp: ptype; call-sc-tc (cha)
        ptype foo
        type = char
        (gdb) FAIL: gdb.base/call-sc.exp: ptype foo; call-sc-tc cha

If I understand your call-sc.exp well, then the test gets the expected
answer for the second test from the first one. But as you see from the
PASS message, it only seems to have picked up the first 3 characters
of the output from the first query. Looks like there is something weird
going on...

The following ones seem to be bona fide problems:

        FAIL: gdb.base/call-sc.exp: value foo returned; return call-sc-tc
        FAIL: gdb.base/call-sc.exp: value foo returned; return call-sc-ts

        p/c L
        $3 = 90 'Z'
        (gdb) PASS: gdb.base/call-sc.exp: zed L for return; return call-sc-tc
        return foo    
        Make fun return now? (y or n) y
        #0  main () at gdb.base/call-sc.c:78
        78            L = fun ();
        (gdb) next
        79            zed ();
        (gdb) PASS: gdb.base/call-sc.exp: return foo; return call-sc-tc
        p/c L
        $4 = 90 'Z'
        (gdb) FAIL: gdb.base/call-sc.exp: value foo returned; return call-sc-tc

I think we expected L to be set to '1'.

And last but not least, this FAIL also seems to be a genuine problem:

        FAIL: gdb.base/call-sc.exp: p/c L; call call-sc-tf

The log files contain the following output:

        p/c fun()
        $1 = 49 '1'
        (gdb) PASS: gdb.base/call-sc.exp: p/c fun(); call call-sc-tf
        call Fun(foo)
        (gdb) PASS: gdb.base/call-sc.exp: call Fun(foo); call call-sc-tf
        p/c L 
        $2 = 0 '\0'
        (gdb) FAIL: gdb.base/call-sc.exp: p/c L; call call-sc-tf

The first "p/c fun()" proves that foo is correctly equal to '1', so
after Fun(foo) is called, L should be set to '1' too...

-- 
Joel


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