From patchwork Tue Feb 26 19:13:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 31603 Received: (qmail 62477 invoked by alias); 26 Feb 2019 19:13:49 -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 62408 invoked by uid 89); 26 Feb 2019 19:13:48 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=tromeyadacorecom, tromey@adacore.com, sk:tromey, sk:tromey@ X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 26 Feb 2019 19:13:45 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 5E7BD5607D; Tue, 26 Feb 2019 14:13:44 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id n2iihHUDBxOc; Tue, 26 Feb 2019 14:13:44 -0500 (EST) Received: from murgatroyd.Home (75-166-85-218.hlrn.qwest.net [75.166.85.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPSA id 0B4B1117C8A; Tue, 26 Feb 2019 14:13:43 -0500 (EST) From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [FYI] Fix new py-value.exp test case Date: Tue, 26 Feb 2019 12:13:41 -0700 Message-Id: <20190226191341.24238-1-tromey@adacore.com> MIME-Version: 1.0 The new test case in py-value.exp fails -- the code was changed to throw ValueError, but the test still checks for TypeError. This patch fixes the problem. I'm checking this in. Tested on x86-64 Fedora 29. gdb/testsuite/ChangeLog 2019-02-26 Tom Tromey * gdb.python/py-value.exp (test_value_from_buffer): Check for ValueError, not TypeError. --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.python/py-value.exp | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.python/py-value.exp b/gdb/testsuite/gdb.python/py-value.exp index d42aff90f3b..b3d90b52272 100644 --- a/gdb/testsuite/gdb.python/py-value.exp +++ b/gdb/testsuite/gdb.python/py-value.exp @@ -530,7 +530,7 @@ proc test_value_from_buffer {} { gdb_test "python v=gdb.Value(b\[2*size_a0:\],tp); print(v)" "3" \ "convert 3rd elem of buffer to value" gdb_test "python v=gdb.Value(b\[2*size_a0+1:\],tp); print(v)" \ - "TypeError: Size of type is larger than that of buffer object\..*" \ + "ValueError: Size of type is larger than that of buffer object\..*" \ "attempt to convert smaller buffer than size of type" gdb_py_test_silent_cmd "python atp=tp.array(2) ; print(atp)" \ "make array type" 0