From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32241 invoked by alias); 17 Jun 2013 16:51:27 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 32229 invoked by uid 89); 17 Jun 2013 16:51:26 -0000 X-Spam-SWARE-Status: No, score=-6.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 17 Jun 2013 16:51:25 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r5HGpOaJ028236 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 17 Jun 2013 12:51:24 -0400 Received: from barimba (ovpn-113-102.phx2.redhat.com [10.3.113.102]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r5HGpMGw001767 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 17 Jun 2013 12:51:23 -0400 From: Tom Tromey To: Jan Kratochvil Cc: gdb-patches@sourceware.org Subject: RFC: fix python-selftest.exp failure (Was: new FAIL python-selftest.exp in gdbserver mode [Re: [PATCH 18/28] check gdb_python_initialized everywhere]) References: <87ehe638ww.fsf@fleche.redhat.com> <87vc7iy49l.fsf@fleche.redhat.com> <87zjwqqv2u.fsf@fleche.redhat.com> <20130521082202.GA1789@host2.jankratochvil.net> Date: Mon, 17 Jun 2013 16:59:00 -0000 In-Reply-To: <20130521082202.GA1789@host2.jankratochvil.net> (Jan Kratochvil's message of "Tue, 21 May 2013 10:22:02 +0200") Message-ID: <87hagwd6k5.fsf_-_@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2013-06/txt/msg00382.txt.bz2 Jan> in gdbserver mode: Jan> Running gdb/testsuite/gdb.gdb/python-selftest.exp ... Jan> PASS: gdb.gdb/python-selftest.exp: breakpoint in captured_command_loop Jan> ERROR: tcl error sourcing gdb/testsuite/gdb.gdb/python-selftest.exp. Jan> ERROR: gdbserver does not support run -nw -nx -data-directory /unsafegdb/testsuite.unix.-m64/../data-directory without extended-remote [...] python-selftest.exp fails with an error when using the native-gdbserver.exp board. The bug is that the selftest code doesn't work in this situation. It never has. This patch fixes the problem by pushing the needed check into do_self_tests. This helps prevent the problem in the future. * lib/selftest-support.exp (do_self_tests): Reject remote or non-native targets. * gdb.gdb/complaints.exp: Remove check. * gdb.gdb/observer.exp: Remove check. * gdb.gdb/xfullpath.exp: Remove check. * gdb.gdb/complaints.exp: Remove check. --- gdb/testsuite/gdb.gdb/complaints.exp | 5 ----- gdb/testsuite/gdb.gdb/observer.exp | 5 ----- gdb/testsuite/gdb.gdb/xfullpath.exp | 5 ----- gdb/testsuite/lib/selftest-support.exp | 5 +++++ 4 files changed, 5 insertions(+), 15 deletions(-) diff --git a/gdb/testsuite/gdb.gdb/complaints.exp b/gdb/testsuite/gdb.gdb/complaints.exp index 932dfd5..e5f6e4a 100644 --- a/gdb/testsuite/gdb.gdb/complaints.exp +++ b/gdb/testsuite/gdb.gdb/complaints.exp @@ -19,11 +19,6 @@ load_lib selftest-support.exp -# are we on a target board -if { [is_remote target] || ![isnative] } then { - return -} - if [target_info exists gdb,noinferiorio] { verbose "Skipping because of no inferiorio capabilities." return diff --git a/gdb/testsuite/gdb.gdb/observer.exp b/gdb/testsuite/gdb.gdb/observer.exp index 32030d8..b70c2b1 100644 --- a/gdb/testsuite/gdb.gdb/observer.exp +++ b/gdb/testsuite/gdb.gdb/observer.exp @@ -18,11 +18,6 @@ load_lib selftest-support.exp -# are we on a target board -if { [is_remote target] || ![isnative] } then { - return -} - proc attach_first_observer { message } { gdb_test_no_output "set \$first_obs = observer_attach_test_notification (&observer_test_first_notification_function)" \ "$message; attach first observer" diff --git a/gdb/testsuite/gdb.gdb/xfullpath.exp b/gdb/testsuite/gdb.gdb/xfullpath.exp index 5bc01c6..d758a18 100644 --- a/gdb/testsuite/gdb.gdb/xfullpath.exp +++ b/gdb/testsuite/gdb.gdb/xfullpath.exp @@ -18,11 +18,6 @@ load_lib selftest-support.exp -# are we on a target board -if { [is_remote target] || ![isnative] } then { - return -} - proc test_with_self {} { # A file which contains a directory prefix gdb_test "print gdb_realpath (\"./xfullpath.exp\")" \ diff --git a/gdb/testsuite/lib/selftest-support.exp b/gdb/testsuite/lib/selftest-support.exp index c375849..fc4bccc 100644 --- a/gdb/testsuite/lib/selftest-support.exp +++ b/gdb/testsuite/lib/selftest-support.exp @@ -119,6 +119,11 @@ proc selftest_setup { executable function } { proc do_self_tests {function body} { global GDB tool + # Are we on a target board. + if { [is_remote target] || ![isnative] } then { + return + } + # Run the test with self. Copy the file executable file in case # this OS doesn't like to edit its own text space. -- 1.8.1.4