From patchwork Thu May 4 15:06:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 20276 Received: (qmail 50225 invoked by alias); 4 May 2017 15:06:17 -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 50215 invoked by uid 89); 4 May 2017 15:06:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= 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 ESMTP; Thu, 04 May 2017 15:06:16 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7A3987F3EB for ; Thu, 4 May 2017 15:06:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 7A3987F3EB Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=palves@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 7A3987F3EB Received: from cascais.lan (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0997418222 for ; Thu, 4 May 2017 15:06:16 +0000 (UTC) From: Pedro Alves To: gdb-patches@sourceware.org Subject: [pushed/ob master+8.0] Fix gdb.python/py-record-btrace-threads.exp with Python 3 Date: Thu, 4 May 2017 16:06:16 +0100 Message-Id: <1493910376-2821-1-git-send-email-palves@redhat.com> Fix several instances of: ... python print not f1calls File "", line 1 print not f1calls ^ SyntaxError: Missing parentheses in call to 'print' Error while executing Python code. (gdb) FAIL: gdb.python/py-record-btrace-threads.exp: thread=1: checking thread 1: python print not f1calls ... gdb/testsuite/ChangeLog: 2017-05-04 Pedro Alves * gdb.python/py-record-btrace-threads.exp (check_insn_for_thread): Add parens to print call for Python 3. --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.python/py-record-btrace-threads.exp | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 30b1b5d..b1f9694 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-05-04 Pedro Alves + + * gdb.python/py-record-btrace-threads.exp (check_insn_for_thread): + Add parens to print call for Python 3. + 2017-05-04 Tim Wiederhake * gdb.python/py-record-btrace.exp: Rename prev_sibling and next_sibling diff --git a/gdb/testsuite/gdb.python/py-record-btrace-threads.exp b/gdb/testsuite/gdb.python/py-record-btrace-threads.exp index 17fb5d0..2be73eb 100644 --- a/gdb/testsuite/gdb.python/py-record-btrace-threads.exp +++ b/gdb/testsuite/gdb.python/py-record-btrace-threads.exp @@ -69,8 +69,8 @@ proc check_insn_for_thread { self other } { gdb_test_no_output "python f1calls = \{x for x in fch if x.symbol and x.symbol.name == \"func1\"\}" gdb_test_no_output "python f2calls = \{x for x in fch if x.symbol and x.symbol.name == \"func2\"\}" - gdb_test "python print not f${self}calls" "False" - gdb_test "python print not f${other}calls" "True" + gdb_test "python print(not f${self}calls)" "False" + gdb_test "python print(not f${other}calls)" "True" } }