From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 94665 invoked by alias); 27 Feb 2019 18:52:14 -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 94649 invoked by uid 89); 27 Feb 2019 18:52:13 -0000 Authentication-Results: sourceware.org; auth=none 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,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy= X-HELO: mail-wm1-f66.google.com Received: from mail-wm1-f66.google.com (HELO mail-wm1-f66.google.com) (209.85.128.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 27 Feb 2019 18:52:12 +0000 Received: by mail-wm1-f66.google.com with SMTP id a62so6942147wmh.4 for ; Wed, 27 Feb 2019 10:52:12 -0800 (PST) Return-Path: Received: from ?IPv6:2001:8a0:f913:f700:4c97:6d52:2cea:997b? ([2001:8a0:f913:f700:4c97:6d52:2cea:997b]) by smtp.gmail.com with ESMTPSA id p1sm2141799wmi.9.2019.02.27.10.52.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Feb 2019 10:52:09 -0800 (PST) Subject: [PATCH] Test "set width/height -1" (Re: [PATCH 2/2] Make 'show width/height' display "unlimited" when capped for readline) To: Kevin Buettner , Tom Tromey References: <20190214185254.15369a0a@f29-4.lan> <9e42397a-e3a5-0296-d239-70f4c7c0d215@redhat.com> <87wom0yfcb.fsf@tromey.com> <300b07b2-3803-a573-33a2-049b630a6164@redhat.com> <87tvgynpcz.fsf@tromey.com> <20190220160159.18302361@f29-4.lan> <12d810aa-a0fe-429a-fac2-255197076763@redhat.com> Cc: gdb-patches@sourceware.org, Saagar Jha From: Pedro Alves Message-ID: <5e5690c4-56f5-dec6-d6e0-8e3ca75a7929@redhat.com> Date: Wed, 27 Feb 2019 18:52:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <12d810aa-a0fe-429a-fac2-255197076763@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-02/txt/msg00497.txt.bz2 On 02/27/2019 06:50 PM, Pedro Alves wrote: > On 02/20/2019 11:01 PM, Kevin Buettner wrote: >> On Wed, 20 Feb 2019 14:04:28 -0700 >> Tom Tromey wrote: >> >>>>>>>> "Pedro" == Pedro Alves writes: >>> >>> Pedro> So how about this version instead? >>> >>> Pedro> And this as a follow up? >>> >>> These both look good to me. >>> Thanks for following up on this. >> >> LGTM too. > Thanks. I've checked these in now. And this obvious follow up too. >From 5862844d0f443b9f65e8dd0d85c43f8818d3f355 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Wed, 27 Feb 2019 18:48:37 +0000 Subject: [PATCH] Test "set width/height -1" As a follow up to the previous commit, add a test for "set width/height -1", to make sure we don't overflow in readline with negative values either. gdb/testsuite/ChangeLog: 2019-02-27 Pedro Alves * gdb.base/page.exp: Add tests for "set width/height -1". --- gdb/testsuite/ChangeLog | 4 ++++ gdb/testsuite/gdb.base/page.exp | 3 +++ 2 files changed, 7 insertions(+) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index b5177c7e07..29b2832764 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2019-02-27 Pedro Alves + + * gdb.base/page.exp: Add tests for "set width/height -1". + 2019-02-27 Pedro Alves * gdb.base/page.exp: Add tests for "set/show width/height" with diff --git a/gdb/testsuite/gdb.base/page.exp b/gdb/testsuite/gdb.base/page.exp index 8f1698c26e..68d94b38a3 100644 --- a/gdb/testsuite/gdb.base/page.exp +++ b/gdb/testsuite/gdb.base/page.exp @@ -118,6 +118,9 @@ foreach_with_prefix size {"0" "0x80000000" "unlimited"} { "Number of lines gdb thinks are in a page is unlimited\\." } +gdb_test "set width -1" "integer -1 out of range" +gdb_test "set height -1" "integer -1 out of range" + gdb_exit return 0 -- 2.14.4