From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id B0E4B394201D for ; Thu, 12 Mar 2020 12:52:24 +0000 (GMT) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id D2452B020 for ; Thu, 12 Mar 2020 12:52:23 +0000 (UTC) Date: Thu, 12 Mar 2020 13:52:22 +0100 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Fix internal buffer full error in gdb.fortran/module.exp Message-ID: <20200312125220.GA31120@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-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_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Mar 2020 12:52:25 -0000 Hi, With test-case gdb.fortran/module.exp, I run into: ... PASS: gdb.fortran/module.exp: fully qualified name of DW_TAG_constant ERROR: internal buffer is full. UNRESOLVED: gdb.fortran/module.exp: info variables -n ... Fix this by using exp_continue while matching the output of "info variable -n". Tested on x86_64-linux, using make targets check and check-read1. Committed to trunk. Thanks, - Tom [gdb/testsuite] Fix internal buffer full error in gdb.fortran/module.exp gdb/testsuite/ChangeLog: 2020-03-12 Tom de Vries * gdb.fortran/module.exp: Use exp_continue during matching of output of "info variable -n". --- gdb/testsuite/gdb.fortran/module.exp | 37 +++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/gdb/testsuite/gdb.fortran/module.exp b/gdb/testsuite/gdb.fortran/module.exp index 6551f5b2cf..1c269e2fed 100644 --- a/gdb/testsuite/gdb.fortran/module.exp +++ b/gdb/testsuite/gdb.fortran/module.exp @@ -37,11 +37,8 @@ if ![runto MAIN__] then { set int_type [fortran_int4] # Test 'info variables' can find module variables. -gdb_test "info variables -n" \ +set mod_re \ [multi_line \ - "All defined variables:" \ - "" \ - "File .*$srcfile:" \ "18:\[ \t\]+${int_type} mod1::var_const;" \ "17:\[ \t\]+${int_type} mod1::var_i;" \ "23:\[ \t\]+${int_type} mod2::var_i;" \ @@ -53,11 +50,33 @@ gdb_test "info variables -n" \ "33:\[ \t\]+${int_type} modmany::var_c;" \ "33:\[ \t\]+${int_type} modmany::var_i;" \ "37:\[ \t\]+${int_type} moduse::var_x;" \ - "37:\[ \t\]+${int_type} moduse::var_y;(" \ - "" \ - "File .*:(" \ - "$decimal:.*)+)*"] - + "37:\[ \t\]+${int_type} moduse::var_y;"] + +set state 0 +gdb_test_multiple "info variables -n" "" { + -re "\r\nAll defined variables:" { + if { $state == 0 } { set state 1 } + exp_continue + } + -re "\r\n\r\nFile .*[string_to_regexp $srcfile]:" { + if { $state == 1 } { set state 2 } + exp_continue + } + -re $mod_re { + if { $state == 2 } { set state 3 } + exp_continue + } + -re "\r\n\r\nFile \[^\r\n\]*:" { + exp_continue + } + -re -wrap "" { + if { $state == 3} { + pass $gdb_test_name + } else { + fail $gdb_test_name + } + } +} # Do not use simple single-letter names as GDB would pick up for expectedly # nonexisting symbols some static variables from system libraries debuginfos.