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 3D56939450F0 for ; Thu, 12 Mar 2020 14:00:28 +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 52330AD48 for ; Thu, 12 Mar 2020 14:00:27 +0000 (UTC) Date: Thu, 12 Mar 2020 15:00:25 +0100 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Fix internal buffer full error in gdb.base/info-types.exp Message-ID: <20200312140023.GA4167@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 14:00:29 -0000 Hi, With test-case gdb.base/info-types.exp, I run into: ... ERROR: internal buffer is full. UNRESOLVED: gdb.base/info-types.exp: l=c: info types ERROR: internal buffer is full. UNRESOLVED: gdb.base/info-types.exp: l=c++: info types ... Fix this by using exp_continue while matching the output of "info types". 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.base/info-types.exp gdb/testsuite/ChangeLog: 2020-03-12 Tom de Vries * gdb.base/info-types.exp: Use exp_continue during matching of output of "info types". --- gdb/testsuite/gdb.base/info-types.exp | 40 +++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/gdb/testsuite/gdb.base/info-types.exp b/gdb/testsuite/gdb.base/info-types.exp index a69620af7a..7cce756e92 100644 --- a/gdb/testsuite/gdb.base/info-types.exp +++ b/gdb/testsuite/gdb.base/info-types.exp @@ -54,9 +54,6 @@ proc run_test { lang } { if { $lang == "c++" } { set output_re \ [multi_line \ - "All defined types:" \ - "" \ - "File .*:" \ "98:\[\t \]+CL;" \ "42:\[\t \]+anon_struct_t;" \ "65:\[\t \]+anon_union_t;" \ @@ -86,15 +83,10 @@ proc run_test { lang } { "19:\[\t \]+typedef float nested_float_t;" \ "18:\[\t \]+typedef int nested_int_t;" \ "62:\[\t \]+typedef union_t nested_union_t;(" \ - "\[\t \]+unsigned int)?(" \ - "" \ - "File .*:.*)?" ] + "\[\t \]+unsigned int)?"] } else { set output_re \ [multi_line \ - "All defined types:" \ - "" \ - "File .*:" \ "52:\[\t \]+typedef enum {\\.\\.\\.} anon_enum_t;" \ "45:\[\t \]+typedef struct {\\.\\.\\.} anon_struct_t;" \ "68:\[\t \]+typedef union {\\.\\.\\.} anon_union_t;" \ @@ -118,12 +110,34 @@ proc run_test { lang } { "18:\[\t \]+typedef int nested_int_t;" \ "62:\[\t \]+typedef union union_t nested_union_t;" \ "56:\[\t \]+union union_t;(" \ - "\[\t \]+unsigned int)?(" \ - "" \ - "File .*:.*)?" ] + "\[\t \]+unsigned int)?"] } - gdb_test "info types" $output_re + set state 0 + gdb_test_multiple "info types" "" { + -re "\r\nAll defined types:" { + 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 $output_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 + } + } + } } foreach_with_prefix l $lang {