From patchwork Fri Dec 11 21:38:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 9989 Received: (qmail 8680 invoked by alias); 11 Dec 2015 21:38:56 -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 8632 invoked by uid 89); 11 Dec 2015 21:38:55 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-HELO: mail-wm0-f51.google.com Received: from mail-wm0-f51.google.com (HELO mail-wm0-f51.google.com) (74.125.82.51) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 11 Dec 2015 21:38:52 +0000 Received: by mail-wm0-f51.google.com with SMTP id l68so32267932wml.0 for ; Fri, 11 Dec 2015 13:38:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=wTFeuiXfO9eHHRlGTRP9mrqy6h7T6XddvuhFZQUA4k8=; b=Nd6m1SOjvKdY4u2OKvLVal34GnY3HykLiu8Wj3afnzQ1H61YflicHDbSWqk3itlhJv skK/xefmYrajzNnqARpT+GjNrA8CZTGlP3T+AvXl3rnJ1303F542CDU1h5vTrF8G1VRs 0JzxQlzBrmdW+57FoT5vcYZN9BK4V+eI3P4BWylQlgMzAiOCfPC0eSC1JQLoBZt/Ik4F bpfR0qoyWUNxkRE8gkNg4PeuHIDLPaS8b5s7qzY63pbZo6szXuVkBtCo270j60U8mRZf GNg8FSJQ2lDo82osFjwtECJQ+jKr1//VfJ1vILYfWQJThEhmdQ7mVQqy3OEd6+YgIlP2 Ek3A== X-Gm-Message-State: ALoCoQmaiLlggOrlYJ7KJPQTcZnhJpixMXlPkMDYl/Jl966f2uJU9bCXnjyjuiqGjQhvXBDy7drr+HvevxxEFNFify9LxsrIaQ== X-Received: by 10.28.173.21 with SMTP id w21mr9082682wme.102.1449869929295; Fri, 11 Dec 2015 13:38:49 -0800 (PST) Received: from localhost (host86-138-95-213.range86-138.btcentralplus.com. [86.138.95.213]) by smtp.gmail.com with ESMTPSA id c13sm4998516wmd.14.2015.12.11.13.38.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Dec 2015 13:38:48 -0800 (PST) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCH 2/3] gdb: Set max-value-size before running tests. Date: Fri, 11 Dec 2015 21:38:36 +0000 Message-Id: In-Reply-To: References: In-Reply-To: References: X-IsSubscribed: yes Setting the max-value-size before running any tests should prevent any issues where a failing test causes gdb to bring down the testing machine. The maximum size is set to 1G, this is large enough to handle all the well behaving tests, and should make no difference to the test results. There is one test, gdb.mi/mi-vla-fortran.exp that contains undefined behaviour, one some machines this test is known to trigger the max-value-size error. However, on those machines the test would have failed anyway, so this commit does not change the PASS / FAIL nature of the test. A later commit should modify the mi-vla-fortran.exp test to expect the failure case. gdb/testsuite/ChangeLog: * lib/gdb.exp (default_gdb_start): Set max-value-size. * lib/mi-support.exp (default_mi_gdb_start): Likewise. * gdb.base/max-value-size.exp: Don't check the initial value. --- gdb/testsuite/ChangeLog | 6 ++++++ gdb/testsuite/gdb.base/max-value-size.exp | 8 +++----- gdb/testsuite/lib/gdb.exp | 10 ++++++++++ gdb/testsuite/lib/mi-support.exp | 10 ++++++++++ 4 files changed, 29 insertions(+), 5 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 93bb3bb..0673d01 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,11 @@ 2015-12-11 Andrew Burgess + * lib/gdb.exp (default_gdb_start): Set max-value-size. + * lib/mi-support.exp (default_mi_gdb_start): Likewise. + * gdb.base/max-value-size.exp: Don't check the initial value. + +2015-12-11 Andrew Burgess + * gdb.base/max-value-size.c: New file. * gdb.base/max-value-size.exp: New file. diff --git a/gdb/testsuite/gdb.base/max-value-size.exp b/gdb/testsuite/gdb.base/max-value-size.exp index cb09ad8..21f4552 100644 --- a/gdb/testsuite/gdb.base/max-value-size.exp +++ b/gdb/testsuite/gdb.base/max-value-size.exp @@ -25,11 +25,9 @@ if ![runto_main] then { return 0 } -gdb_test "show max-value-size" \ - "Maximum value size is unlimited." \ - "the initial value of max-value-size is unlimited" - -with_test_prefix "max-value-size is 'unlimited'" { +# The testing infrastructure does set the max-value-size, however, it +# should always be large enough for these values. +with_test_prefix "using initial max-value-size" { gdb_test "p/d one" " = 0" gdb_test "p/d one_hundred" " = \\{0 \\}" } diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index beb97ea..215feba 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -1631,6 +1631,16 @@ proc default_gdb_start { } { warning "Couldn't set the width to 0." } } + # set maximum value size to 1G, no tests currently require more. + send_gdb "set max-value-size 1024 * 1024 * 1024\n" + gdb_expect 10 { + -re "$gdb_prompt $" { + verbose "Setting max-value-size to 1G" 2 + } + timeout { + warning "Couldn't set the max-value-size to 1G." + } + } return 0 } diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp index 9619fb3..ab64366 100644 --- a/gdb/testsuite/lib/mi-support.exp +++ b/gdb/testsuite/lib/mi-support.exp @@ -204,6 +204,16 @@ proc default_mi_gdb_start { args } { warning "Couldn't set the width to 0." } } + # set maximum value size to 1G, no tests currently require more. + send_gdb "102-gdb-set max-value-size 1024 * 1024 * 1024\n" + gdb_expect 10 { + -re ".*102-gdb-set max-value-size \[^\r\n\]+\r\n102\\\^done\r\n$mi_gdb_prompt$" { + verbose "Setting max-value-size to 1G" 2 + } + timeout { + warning "Couldn't set the max-value-size to 1G." + } + } # Create the new PTY for the inferior process. if { $separate_inferior_pty } {