public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] [gdb/testsuite] Add xfail case in gdb.python/py-record-btrace.exp
@ 2023-02-17 14:22 Tom de Vries
  2023-02-20  7:38 ` Metzger, Markus T
  0 siblings, 1 reply; 3+ messages in thread
From: Tom de Vries @ 2023-02-17 14:22 UTC (permalink / raw)
  To: gdb-patches; +Cc: Markus T . Metzger

I came across:
...
gdb) PASS: gdb.python/py-record-btrace.exp: prepare record: stepi 100
python insn = r.instruction_history^M
warning: Non-contiguous trace at instruction 1 (offset = 0x3e10).^M
(gdb) FAIL: gdb.python/py-record-btrace.exp: prepare record: python insn = r.i\
nstruction_history
...

I'm assuming it's the same root cause as for the already present XFAIL.

Fix this by recognizing above warning in the xfail regexp.

Tested on x86_64-linux, although sofar I was not able to trigger the warning
again.
---
 gdb/testsuite/gdb.python/py-record-btrace.exp | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.python/py-record-btrace.exp b/gdb/testsuite/gdb.python/py-record-btrace.exp
index c055a882f85..703db0ce8e1 100644
--- a/gdb/testsuite/gdb.python/py-record-btrace.exp
+++ b/gdb/testsuite/gdb.python/py-record-btrace.exp
@@ -76,6 +76,11 @@ with_test_prefix "prepare record" {
 		  "warning: Decode error \\($nonl_re*\\) at instruction $decimal" \
 		  "\\(offset = $hex, pc = $hex\\):" \
 		  "$nonl_re*\\."]]
+    set xfail_re_2 \
+	[join \
+	     [list \
+		  "warning: Non-contiguous trace at instruction $decimal" \
+		  "\\(offset = $hex\\)\\."]]
 
     set got_xfail 0
     set cmd "python insn = r.instruction_history"
@@ -83,7 +88,7 @@ with_test_prefix "prepare record" {
 	-re "^[string_to_regexp $cmd]\r\n$::gdb_prompt $" {
 	    pass $gdb_test_name
 	}
-	-re -wrap "$xfail_re" {
+	-re -wrap "($xfail_re|$xfail_re_2)" {
 	    if { $have_xfail } {
 		xfail $gdb_test_name
 		set got_xfail 1

base-commit: ccd87ffec78506220973b84f4f2b48137a9ef408
-- 
2.35.3


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] [gdb/testsuite] Add xfail case in gdb.python/py-record-btrace.exp
  2023-02-17 14:22 [PATCH] [gdb/testsuite] Add xfail case in gdb.python/py-record-btrace.exp Tom de Vries
@ 2023-02-20  7:38 ` Metzger, Markus T
  2023-02-20 10:36   ` Tom de Vries
  0 siblings, 1 reply; 3+ messages in thread
From: Metzger, Markus T @ 2023-02-20  7:38 UTC (permalink / raw)
  To: Tom de Vries, gdb-patches

Hello Tom,

>I came across:
>...
>gdb) PASS: gdb.python/py-record-btrace.exp: prepare record: stepi 100
>python insn = r.instruction_history^M
>warning: Non-contiguous trace at instruction 1 (offset = 0x3e10).^M
>(gdb) FAIL: gdb.python/py-record-btrace.exp: prepare record: python insn = r.i\
>nstruction_history
>...
>
>I'm assuming it's the same root cause as for the already present XFAIL.
>
>Fix this by recognizing above warning in the xfail regexp.
>
>Tested on x86_64-linux, although sofar I was not able to trigger the warning
>again.
>---
> gdb/testsuite/gdb.python/py-record-btrace.exp | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)

Looks good to me.

Markus.
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva  
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] [gdb/testsuite] Add xfail case in gdb.python/py-record-btrace.exp
  2023-02-20  7:38 ` Metzger, Markus T
@ 2023-02-20 10:36   ` Tom de Vries
  0 siblings, 0 replies; 3+ messages in thread
From: Tom de Vries @ 2023-02-20 10:36 UTC (permalink / raw)
  To: Metzger, Markus T, gdb-patches

On 2/20/23 08:38, Metzger, Markus T wrote:
> Hello Tom,
> 
>> I came across:
>> ...
>> gdb) PASS: gdb.python/py-record-btrace.exp: prepare record: stepi 100
>> python insn = r.instruction_history^M
>> warning: Non-contiguous trace at instruction 1 (offset = 0x3e10).^M
>> (gdb) FAIL: gdb.python/py-record-btrace.exp: prepare record: python insn = r.i\
>> nstruction_history
>> ...
>>
>> I'm assuming it's the same root cause as for the already present XFAIL.
>>
>> Fix this by recognizing above warning in the xfail regexp.
>>
>> Tested on x86_64-linux, although sofar I was not able to trigger the warning
>> again.
>> ---
>> gdb/testsuite/gdb.python/py-record-btrace.exp | 7 ++++++-
>> 1 file changed, 6 insertions(+), 1 deletion(-)
> 
> Looks good to me.
> 


Thanks, added approved-by tag and committed.

- Tom


> Markus.
> Intel Deutschland GmbH
> Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
> Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
> Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva
> Chairperson of the Supervisory Board: Nicole Lau
> Registered Office: Munich
> Commercial Register: Amtsgericht Muenchen HRB 186928
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-02-20 10:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-17 14:22 [PATCH] [gdb/testsuite] Add xfail case in gdb.python/py-record-btrace.exp Tom de Vries
2023-02-20  7:38 ` Metzger, Markus T
2023-02-20 10:36   ` Tom de Vries

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).