From patchwork Mon Jan 12 17:13:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 4626 Received: (qmail 20386 invoked by alias); 12 Jan 2015 17:13:40 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 20371 invoked by uid 89); 12 Jan 2015 17:13:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 12 Jan 2015 17:13:37 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t0CHDYo3017486 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 12 Jan 2015 12:13:35 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t0CHDMFu011917; Mon, 12 Jan 2015 12:13:27 -0500 Message-ID: <54B400B1.60901@redhat.com> Date: Mon, 12 Jan 2015 17:13:21 +0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Sergio Durigan Junior CC: "Breazeal, Don" , Yao Qi , gdb-patches@sourceware.org Subject: [PATCH] gdb.python/py-prompt.exp: restore GDBFLAGS References: <1418748834-27545-1-git-send-email-palves@redhat.com> <1418748834-27545-6-git-send-email-palves@redhat.com> <87wq5qsfaf.fsf@codesourcery.com> <54921989.4060005@redhat.com> <54AADFA1.9040003@codesourcery.com> <54AD5BFC.2030906@redhat.com> <54AFBA7B.6040403@redhat.com> <87h9vwpq1x.fsf_-_@redhat.com> <54B3ACD0.60208@redhat.com> <878uh8os5m.fsf@redhat.com> <54B3FDC6.5070609@redhat.com> In-Reply-To: <54B3FDC6.5070609@redhat.com> On 01/12/2015 05:00 PM, Pedro Alves wrote: > On 01/12/2015 04:55 PM, Sergio Durigan Junior wrote: > >> Running the testcase alone seems to be fine. The problem happens when >> you run the entire gdb.python/ directory: >> >> make check RUNTESTFLAGS="--target_board=native-gdbserver --directory=gdb.python" > > Ah, yes. I see the bug. Will push a fix in a bit. Pushed now. Thanks! ----- Subject: [PATCH] gdb.python/py-prompt.exp: restore GDBFLAGS The previous change to py-prompt.exp made it return without restoring GDBFLAGS, resulting in breaking the following tests: $ make check RUNTESTFLAGS="--target_board=native-gdbserver --directory=gdb.python" ... Running src/gdb/testsuite/gdb.python/py-prompt.exp ... Running src/gdb/testsuite/gdb.python/py-section-script.exp ... ERROR: (timeout) GDB never initialized after 10 seconds. ERROR: no fileid for gdbuild ERROR: Couldn't send python print ('test') to GDB. ERROR: no fileid for gdbuild ERROR: Couldn't send python print (sys.version_info[0]) to GDB. ERROR: no fileid for gdbuild ERROR: Couldn't send python print (sys.version_info[1]) to GDB. ERROR: no fileid for gdbuild ERROR: no fileid for gdbuild ... gdb/testsuite/ 2015-01-12 Pedro Alves * gdb.python/py-prompt.exp: When the board can't spawn for attach, restore GDBFLAGS before returning. --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.python/py-prompt.exp | 1 + 2 files changed, 6 insertions(+) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 7343d03..db1f521 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-01-12 Pedro Alves + + * gdb.python/py-prompt.exp: When the board can't spawn for attach, + restore GDBFLAGS before returning. + 2015-01-12 Jan Kratochvil * gdb.python/py-frame.exp (test Frame.read_register(rip)): Use diff --git a/gdb/testsuite/gdb.python/py-prompt.exp b/gdb/testsuite/gdb.python/py-prompt.exp index 55f0f59..0f7a3a4 100644 --- a/gdb/testsuite/gdb.python/py-prompt.exp +++ b/gdb/testsuite/gdb.python/py-prompt.exp @@ -76,6 +76,7 @@ gdb_test "python print (\"'\" + str(p\[0\]) + \"'\")" "'$gdb_prompt_fail '" \ gdb_exit if {![can_spawn_for_attach]} { + set GDBFLAGS $saved_gdbflags return 0 }