Bug 17017 - gdb.python/py-xmethods.exp fails against gdbserver
Summary: gdb.python/py-xmethods.exp fails against gdbserver
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: gdb (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: 7.8
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-04 12:49 UTC by Pedro Alves
Modified: 2014-06-18 16:04 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pedro Alves 2014-06-04 12:49:35 UTC
$ make check RUNTESTFLAGS="--target_board=native-gdbserver gdb.python/py-xmethods.exp"
...
Running ../../../src/gdb/testsuite/gdb.python/py-xmethods.exp ...
FAIL: gdb.python/py-xmethods.exp: Before: a1 + a2
FAIL: gdb.python/py-xmethods.exp: Before: a1 - a2
FAIL: gdb.python/py-xmethods.exp: Before: b1 - a1
FAIL: gdb.python/py-xmethods.exp: Before: a1.geta()
FAIL: gdb.python/py-xmethods.exp: Before: a_ptr->geta()
FAIL: gdb.python/py-xmethods.exp: Before: e.geta()
FAIL: gdb.python/py-xmethods.exp: Before: g.size_diff<float>()
FAIL: gdb.python/py-xmethods.exp: Before: g.size_mul<2>()
FAIL: gdb.python/py-xmethods.exp: Before: g.mul<double>(2.0)
FAIL: gdb.python/py-xmethods.exp: After: a1 - a2
FAIL: gdb.python/py-xmethods.exp: After: b1 - a1
                === gdb Summary ===

# of expected passes            35
# of unexpected failures        11


It all passes cleanly against native.  This is on Fedora 20.

Examples from gdb.log:

(gdb) PASS: gdb.python/py-xmethods.exp: continue to breakpoint: Break here
p a1 + a2
From CC <A_plus_A>:
$1 = 15
(gdb) FAIL: gdb.python/py-xmethods.exp: Before: a1 + a2
p a2 - a1
From CC <A_minus_A>:
$2 = 5
(gdb) FAIL: gdb.python/py-xmethods.exp: Before: a1 - a2
Comment 1 Sourceware Commits 2014-06-18 11:38:32 UTC
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gdb and binutils".

The branch, master has been updated
       via  5d376983ca914e1cf36f4968cc87957f9033ebcd (commit)
      from  5171def394398d2a3cc6583747e2f19602f0e1da (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5d376983ca914e1cf36f4968cc87957f9033ebcd

commit 5d376983ca914e1cf36f4968cc87957f9033ebcd
Author: Siva Chandra <sivachandra@chromium.org>
Date:   Thu Jun 5 07:03:56 2014 -0700

    Make xmethods tests not to depend on inferior IO.
    
    gdb/testsuite/
    
    	PR gdb/17017
    	* gdb.python/py-xmethods.cc: Add global function call counters and
    	increment them in their respective functions.  Remove "cout"
    	statements.
    	* gdb.python/py-xmethods.exp: Make tests check the global function
    	call counters instead of depending on inferior IO.

-----------------------------------------------------------------------

Summary of changes:
 gdb/testsuite/ChangeLog                  |    9 +++++
 gdb/testsuite/gdb.python/py-xmethods.cc  |   32 +++++++++++------
 gdb/testsuite/gdb.python/py-xmethods.exp |   54 ++++++++++++++++++++++--------
 3 files changed, 70 insertions(+), 25 deletions(-)
Comment 2 Pedro Alves 2014-06-18 16:04:31 UTC
Fixed.