From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2205) id 0C6363937430; Thu, 19 Mar 2020 07:44:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0C6363937430 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Tom de Vries To: gdb-cvs@sourceware.org Subject: [binutils-gdb] [gdb/testsuite] Fix gdb.opt/inline-locals.exp KFAILs X-Act-Checkin: binutils-gdb X-Git-Author: Tom de Vries X-Git-Refname: refs/heads/master X-Git-Oldrev: effc14f54c3fdcb700f22ce53cef97665c0fdf7f X-Git-Newrev: d8c8b84859d057c58c901c08367ecc9f8a9f09dc Message-Id: <20200319074407.0C6363937430@sourceware.org> Date: Thu, 19 Mar 2020 07:44:07 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Mar 2020 07:44:07 -0000 https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d8c8b84859d057c58c901c08367ecc9f8a9f09dc commit d8c8b84859d057c58c901c08367ecc9f8a9f09dc Author: Tom de Vries Date: Thu Mar 19 08:44:04 2020 +0100 [gdb/testsuite] Fix gdb.opt/inline-locals.exp KFAILs When running test-case gdb.opt/inline-locals.exp, I get: ... Running src/gdb/testsuite/gdb.opt/inline-locals.exp ... KPASS: gdb.opt/inline-locals.exp: info locals above bar 2 (PRMS gdb/xyz) KPASS: gdb.opt/inline-locals.exp: info locals above bar 3 (PRMS gdb/xyz) ... I've opened PR25695 - 'abstract and concrete variable listed both with "info locals"' to refer to in the PRMS field, and this patch adds that reference. Furthermore, I noticed that while I see KPASSes, given the problem description the tests should actually be KFAILs. This patch also fixes that. Tested on x86_64-linux. With gcc 7.5.0, I get 2 KFAILs. With clang 5.0.2, the tests pass. gdb/testsuite/ChangeLog: 2020-03-19 Tom de Vries * gdb.opt/inline-locals.exp: Add kfail PR number. Make kfail matching more precise. Diff: --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.opt/inline-locals.exp | 26 ++++++++++++++++++++++---- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index ba14abb2c6e..0588fe6ac1a 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2020-03-19 Tom de Vries + + * gdb.opt/inline-locals.exp: Add kfail PR number. Make kfail matching + more precise. + 2020-03-18 Tom de Vries * gdb.dwarf2/break-inline-psymtab-2.c: New test. diff --git a/gdb/testsuite/gdb.opt/inline-locals.exp b/gdb/testsuite/gdb.opt/inline-locals.exp index 58712513e49..3dee0aabfe4 100644 --- a/gdb/testsuite/gdb.opt/inline-locals.exp +++ b/gdb/testsuite/gdb.opt/inline-locals.exp @@ -43,8 +43,17 @@ if { ! $no_frames } { "backtrace from bar 2" gdb_test "up" "#1 .*func1 .* at .*" "up from bar 2" gdb_test "info frame" ".*inlined into frame.*" "func1 inlined 2" - setup_kfail "gdb/xyz" *-*-* - gdb_test "info locals" "array = {.*}" "info locals above bar 2" + set pass_re "array = {$decimal, \[^\r\n\]*}" + set kfail_re [multi_line $pass_re \ + "array = { }"] + gdb_test_multiple "info locals" "info locals above bar 2" { + -re -wrap $pass_re { + pass $gdb_test_name + } + -re -wrap $kfail_re { + kfail gdb/25695 $gdb_test_name + } + } set msg "info args above bar 2" gdb_test_multiple "info args" $msg { @@ -83,8 +92,17 @@ if { ! $no_frames } { "backtrace from bar 3" gdb_test "up" "#1 .*func1 .* at .*" "up from bar 3" gdb_test "info frame" ".*inlined into frame.*" "func1 inlined 3" - setup_kfail "gdb/xyz" *-*-* - gdb_test "info locals" "array = {.*}" "info locals above bar 3" + set pass_re "array = {$decimal, \[^\r\n\]*}" + set kfail_re [multi_line $pass_re \ + "array = { }"] + gdb_test_multiple "info locals" "info locals above bar 2" { + -re -wrap $pass_re { + pass $gdb_test_name + } + -re -wrap $kfail_re { + kfail gdb/25695 $gdb_test_name + } + } set msg "info args above bar 3" gdb_test_multiple "info args" $msg {