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 32C95394201C for ; Fri, 13 Mar 2020 13:44:10 +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 CBEC5AB98 for ; Fri, 13 Mar 2020 13:44:08 +0000 (UTC) Date: Fri, 13 Mar 2020 14:44:07 +0100 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Fix mi-sym-info.exp matching FAILs (2) Message-ID: <20200313134405.GA23424@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: Fri, 13 Mar 2020 13:44:11 -0000 Hi, With debug info packages for system libraries installed, I currently run into some "internal buffer is full" errors with test-case gdb.mi/mi-sym-info.exp, but if I disable the corresponding tests, I get further-on: ... FAIL: gdb.mi/mi-sym-info.exp: List all functions matching pattern f3 \ (unexpected output) FAIL: gdb.mi/mi-sym-info.exp: List all functions matching type void \ (unexpected output) FAIL: gdb.mi/mi-sym-info.exp: List all variables matching type float \ (unexpected output) FAIL: gdb.mi/mi-sym-info.exp: -symbol-info-functions --max-results 1 \ (unexpected output) FAIL: gdb.mi/mi-sym-info.exp: -symbol-info-functions --max-results 2 \ (unexpected output) ... Fix this by making the matching more precise. Tested on x86_64-linux. Also tested with an extra: ... mi_gdb_test "set debug-file-directory" ... to prevent gdb from finding the debug info for system libraries. Committed to trunk. Thanks, - Tom [gdb/testsuite] Fix mi-sym-info.exp matching FAILs (2) gdb/testsuite/ChangeLog: 2020-03-13 Tom de Vries * gdb.mi/mi-sym-info.exp: Make matching more precise. --- gdb/testsuite/gdb.mi/mi-sym-info.exp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gdb/testsuite/gdb.mi/mi-sym-info.exp b/gdb/testsuite/gdb.mi/mi-sym-info.exp index 7f8cf228d9..0537eb1935 100644 --- a/gdb/testsuite/gdb.mi/mi-sym-info.exp +++ b/gdb/testsuite/gdb.mi/mi-sym-info.exp @@ -102,12 +102,12 @@ gdb_test_multiple $cmd ${testname} -prompt "${mi_gdb_prompt}$" { # Filter functions by name and type. set lineno [gdb_get_line_number "f3 (another_int_t arg)" ${srcfile2}] -mi_gdb_test "116-symbol-info-functions --name f3" \ +mi_gdb_test "116-symbol-info-functions --name ^f3$" \ "116\\^done,symbols=\{debug=\\\[\{filename=\"\[^\"\]+$srcfile2\",fullname=\"\[^\"\]+$srcfile2\",symbols=\\\[\{line=\"39\",name=\"f3\",type=\"int \\(another_int_t\\)\",description=\"int f3\\(another_int_t\\);\"\}\\\]\}\\\]\}" \ "List all functions matching pattern f3" set lineno [gdb_get_line_number "f4 (int *arg)" ${srcfile}] -mi_gdb_test "117-symbol-info-functions --type void --name ^\[^_\]" \ +mi_gdb_test "117-symbol-info-functions --type void --name ^f4$" \ "117\\^done,symbols=\{debug=\\\[\{filename=\"\[^\"\]+$srcfile\",fullname=\"\[^\"\]+$srcfile\",symbols=\\\[\{line=\"36\",name=\"f4\",type=\"void \\(int \\*\\)\",description=\"void f4\\(int \\*\\);\"\}\\\]\}\\\]\}" \ "List all functions matching type void" @@ -119,7 +119,7 @@ mi_gdb_test "118-symbol-info-variables --name global_f2" \ set lineno1 [gdb_get_line_number "static float global_f1;" ${srcfile}] set lineno2 [gdb_get_line_number "static float global_f1;" ${srcfile2}] -mi_gdb_test "119-symbol-info-variables --type float" \ +mi_gdb_test "119-symbol-info-variables --type float --name ^global_" \ "119\\^done,symbols=\{debug=\\\[\{filename=\"\[^\"\]+$srcfile\",fullname=\"\[^\"\]+$srcfile\",symbols=\\\[\{line=\"25\",name=\"global_f1\",type=\"float\",description=\"static float global_f1;\"\}\\\]\},\{filename=\"\[^\"\]+$srcfile2\",fullname=\"\[^\"\]+$srcfile2\",symbols=\\\[\{line=\"19\",name=\"global_f1\",type=\"float\",description=\"static float global_f1;\"\}\\\]\}\\\]\}" \ "List all variables matching type float" @@ -135,11 +135,11 @@ mi_gdb_test "121-symbol-info-functions --max-results 0" \ "121\\^done,symbols=\{\}" \ "-symbol-info-functions --max-results 0" -mi_gdb_test "122-symbol-info-functions --max-results 1" \ +mi_gdb_test "122-symbol-info-functions --max-results 1 --name ^\[^_\]" \ "122\\^done,symbols=\{debug=\\\[\{filename=\"\[^\"\]+$srcfile2\",fullname=\"\[^\"\]+$srcfile2\",symbols=\\\[\{line=\"39\",name=\"f3\",type=\"int \\(another_int_t\\)\",description=\"int f3\\(another_int_t\\);\"\}\\\]\}\\\]\}" \ "-symbol-info-functions --max-results 1" -mi_gdb_test "123-symbol-info-functions --max-results 2" \ +mi_gdb_test "123-symbol-info-functions --max-results 2 --name ^\[^_\]" \ "123\\^done,symbols=\{debug=\\\[\{filename=\"\[^\"\]+$srcfile2\",fullname=\"\[^\"\]+$srcfile2\",symbols=\\\[\{line=\"33\",name=\"f2\",type=\"float \\(another_float_t\\)\",description=\"float f2\\(another_float_t\\);\"\},\{line=\"39\",name=\"f3\",type=\"int \\(another_int_t\\)\",description=\"int f3\\(another_int_t\\);\"\}\\\]\}\\\]\}" \ "-symbol-info-functions --max-results 2"