Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [committed][gdb/testsuite] Fix gdb.opt/inline-locals.exp KFAILs
Date: Thu, 19 Mar 2020 08:45:50 +0100	[thread overview]
Message-ID: <20200319074548.GA16288@delia> (raw)

Hi,

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.

Committed to trunk.

Thanks,
- Tom

[gdb/testsuite] Fix gdb.opt/inline-locals.exp KFAILs

gdb/testsuite/ChangeLog:

2020-03-19  Tom de Vries  <tdevries@suse.de>

	* gdb.opt/inline-locals.exp: Add kfail PR number.  Make kfail matching
	more precise.

---
 gdb/testsuite/gdb.opt/inline-locals.exp | 26 ++++++++++++++++++++++----
 1 file changed, 22 insertions(+), 4 deletions(-)

diff --git a/gdb/testsuite/gdb.opt/inline-locals.exp b/gdb/testsuite/gdb.opt/inline-locals.exp
index 58712513e4..3dee0aabfe 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 = {<optimized out> <repeats 64 times>}"]
+    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 = {<optimized out> <repeats 64 times>}"]
+    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 {


                 reply	other threads:[~2020-03-19  7:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200319074548.GA16288@delia \
    --to=tdevries@suse.de \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox