public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/30185] New: FAIL: gdb.python/py-record-btrace.exp: function call: pyth\ on print(c == c.next.prev)
@ 2023-03-01 10:57 vries at gcc dot gnu.org
  2023-03-01 10:57 ` [Bug testsuite/30185] FAIL: gdb.python/py-record-btrace.exp: function call: python " vries at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: vries at gcc dot gnu.org @ 2023-03-01 10:57 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30185

            Bug ID: 30185
           Summary: FAIL: gdb.python/py-record-btrace.exp: function call:
                    pyth\ on print(c == c.next.prev)
           Product: gdb
           Version: 12.1
            Status: NEW
          Severity: normal
          Priority: P2
         Component: testsuite
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

I ran into:
...
(gdb) PASS: gdb.python/py-record-btrace.exp: function call: python
print(c.prev)
python print(c == c.next.prev)^M
Traceback (most recent call last):^M
  File "<string>", line 1, in <module>^M
AttributeError: 'NoneType' object has no attribute 'prev'^M
Error while executing Python code.^M
(gdb) FAIL: gdb.python/py-record-btrace.exp: function call: python print(c ==
c.next.prev)
...

Setup:
- x86_64 (i7-1250U)
- gdb 12.1 based package
- openSUSE Leap 15.4
- chroot with packages from openSUSE Leap 15.4
- test exec is PIE
- libipt 2.0.5

I haven't been able to reproduce it.

The first FAIL seems to be just a consequence from the fact that we have just 4
insns instead of 100:
...
python print(len(insn))^M
4^M
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug testsuite/30185] FAIL: gdb.python/py-record-btrace.exp: function call: python print(c == c.next.prev)
  2023-03-01 10:57 [Bug testsuite/30185] New: FAIL: gdb.python/py-record-btrace.exp: function call: pyth\ on print(c == c.next.prev) vries at gcc dot gnu.org
@ 2023-03-01 10:57 ` vries at gcc dot gnu.org
  2023-03-01 10:57 ` vries at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: vries at gcc dot gnu.org @ 2023-03-01 10:57 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30185

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|FAIL:                       |FAIL:
                   |gdb.python/py-record-btrace |gdb.python/py-record-btrace
                   |.exp: function call: pyth\  |.exp: function call: python
                   |on print(c == c.next.prev)  |print(c == c.next.prev)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug testsuite/30185] FAIL: gdb.python/py-record-btrace.exp: function call: python print(c == c.next.prev)
  2023-03-01 10:57 [Bug testsuite/30185] New: FAIL: gdb.python/py-record-btrace.exp: function call: pyth\ on print(c == c.next.prev) vries at gcc dot gnu.org
  2023-03-01 10:57 ` [Bug testsuite/30185] FAIL: gdb.python/py-record-btrace.exp: function call: python " vries at gcc dot gnu.org
@ 2023-03-01 10:57 ` vries at gcc dot gnu.org
  2023-03-01 10:58 ` vries at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: vries at gcc dot gnu.org @ 2023-03-01 10:57 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30185

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |markus.t.metzger at intel dot com

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug testsuite/30185] FAIL: gdb.python/py-record-btrace.exp: function call: python print(c == c.next.prev)
  2023-03-01 10:57 [Bug testsuite/30185] New: FAIL: gdb.python/py-record-btrace.exp: function call: pyth\ on print(c == c.next.prev) vries at gcc dot gnu.org
  2023-03-01 10:57 ` [Bug testsuite/30185] FAIL: gdb.python/py-record-btrace.exp: function call: python " vries at gcc dot gnu.org
  2023-03-01 10:57 ` vries at gcc dot gnu.org
@ 2023-03-01 10:58 ` vries at gcc dot gnu.org
  2023-03-01 11:08 ` vries at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: vries at gcc dot gnu.org @ 2023-03-01 10:58 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30185

--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
Created attachment 14725
  --> https://sourceware.org/bugzilla/attachment.cgi?id=14725&action=edit
gdb.log

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug testsuite/30185] FAIL: gdb.python/py-record-btrace.exp: function call: python print(c == c.next.prev)
  2023-03-01 10:57 [Bug testsuite/30185] New: FAIL: gdb.python/py-record-btrace.exp: function call: pyth\ on print(c == c.next.prev) vries at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2023-03-01 10:58 ` vries at gcc dot gnu.org
@ 2023-03-01 11:08 ` vries at gcc dot gnu.org
  2023-03-01 11:29 ` markus.t.metzger at intel dot com
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: vries at gcc dot gnu.org @ 2023-03-01 11:08 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30185

--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
If this the same root cause as the existing xfail, we can detect it using:
...
diff --git a/gdb/testsuite/gdb.python/py-record-btrace.exp
b/gdb/testsuite/gdb.p
ython/py-record-btrace.exp
index 703db0ce8e1..f62316b7b1c 100644
--- a/gdb/testsuite/gdb.python/py-record-btrace.exp
+++ b/gdb/testsuite/gdb.python/py-record-btrace.exp
@@ -101,6 +101,23 @@ with_test_prefix "prepare record" {
        return
     }

+    gdb_test_multiple "python print(len(insn))" "" {
+       -re -wrap "100" {
+           pass $gdb_test_name
+       }
+       -re -wrap "" {
+           if { $have_xfail } {
+               xfail $gdb_test_name
+               set got_xfail 1
+           } else {
+               fail $gdb_test_name
+           }
+       }
+    }
+    if { $got_xfail } {
+       return
+    }
+
     gdb_test_no_output "python call = r.function_call_history"
     gdb_test_no_output "python i = insn\[0\]"
     gdb_test_no_output "python c = call\[0\]"
@@ -138,7 +155,6 @@ with_test_prefix "function call" {
 }

 with_test_prefix "list" {
-    gdb_test "python print(len(insn))" "100"
     gdb_test "python print(len(insn\[23:65\]))" "42"
     gdb_test "python print(insn\[17:\]\[2\].number)" "20"
     gdb_test "python print(i in insn)" "True"
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug testsuite/30185] FAIL: gdb.python/py-record-btrace.exp: function call: python print(c == c.next.prev)
  2023-03-01 10:57 [Bug testsuite/30185] New: FAIL: gdb.python/py-record-btrace.exp: function call: pyth\ on print(c == c.next.prev) vries at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2023-03-01 11:08 ` vries at gcc dot gnu.org
@ 2023-03-01 11:29 ` markus.t.metzger at intel dot com
  2023-03-01 11:44 ` vries at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: markus.t.metzger at intel dot com @ 2023-03-01 11:29 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30185

--- Comment #3 from Markus Metzger <markus.t.metzger at intel dot com> ---
This could be caused by the erratum.  It's unlikely that we're not running into
a decode error, but it could happen.

The patch looks good to me.  Thanks.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug testsuite/30185] FAIL: gdb.python/py-record-btrace.exp: function call: python print(c == c.next.prev)
  2023-03-01 10:57 [Bug testsuite/30185] New: FAIL: gdb.python/py-record-btrace.exp: function call: pyth\ on print(c == c.next.prev) vries at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2023-03-01 11:29 ` markus.t.metzger at intel dot com
@ 2023-03-01 11:44 ` vries at gcc dot gnu.org
  2023-03-01 12:43 ` cvs-commit at gcc dot gnu.org
  2023-03-01 12:44 ` vries at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: vries at gcc dot gnu.org @ 2023-03-01 11:44 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30185

--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #0)
> - chroot with packages from openSUSE Leap 15.4

Don't think it's relevant, but this was a typo, needs to be openSUSE Leap 15.3

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug testsuite/30185] FAIL: gdb.python/py-record-btrace.exp: function call: python print(c == c.next.prev)
  2023-03-01 10:57 [Bug testsuite/30185] New: FAIL: gdb.python/py-record-btrace.exp: function call: pyth\ on print(c == c.next.prev) vries at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2023-03-01 11:44 ` vries at gcc dot gnu.org
@ 2023-03-01 12:43 ` cvs-commit at gcc dot gnu.org
  2023-03-01 12:44 ` vries at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-01 12:43 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30185

--- Comment #5 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom de Vries <vries@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=2c29b1ed19711fa2a16558015e5a6b46a09aefeb

commit 2c29b1ed19711fa2a16558015e5a6b46a09aefeb
Author: Tom de Vries <tdevries@suse.de>
Date:   Wed Mar 1 13:44:04 2023 +0100

    [gdb/testsuite] Add another xfail case in gdb.python/py-record-btrace.exp

    I ran into:
    ...
    (gdb) PASS: gdb.python/py-record-btrace.exp: function call: \
      python print(c.prev)
    python print(c == c.next.prev)^M
    Traceback (most recent call last):^M
      File "<string>", line 1, in <module>^M
    AttributeError: 'NoneType' object has no attribute 'prev'^M
    Error while executing Python code.^M
    (gdb) FAIL: gdb.python/py-record-btrace.exp: function call: \
      python print(c == c.next.prev)
    ...
    due to having only 4 insn instead of 100:
    ...
    python print(len(insn))^M
    4^M
    ...

    This could be caused by the same hw bug as we already have an xfail for, so
    expand the xfail matching.

    Tested on x86_64-linux.

    PR testsuite/30185
    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30185

    Approved-By: Markus T. Metzger <markus.t.metzger@intel.com>

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug testsuite/30185] FAIL: gdb.python/py-record-btrace.exp: function call: python print(c == c.next.prev)
  2023-03-01 10:57 [Bug testsuite/30185] New: FAIL: gdb.python/py-record-btrace.exp: function call: pyth\ on print(c == c.next.prev) vries at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2023-03-01 12:43 ` cvs-commit at gcc dot gnu.org
@ 2023-03-01 12:44 ` vries at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: vries at gcc dot gnu.org @ 2023-03-01 12:44 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30185

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
   Target Milestone|---                         |14.1
             Status|NEW                         |RESOLVED

--- Comment #6 from Tom de Vries <vries at gcc dot gnu.org> ---
Added xfail.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

end of thread, other threads:[~2023-03-01 12:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-01 10:57 [Bug testsuite/30185] New: FAIL: gdb.python/py-record-btrace.exp: function call: pyth\ on print(c == c.next.prev) vries at gcc dot gnu.org
2023-03-01 10:57 ` [Bug testsuite/30185] FAIL: gdb.python/py-record-btrace.exp: function call: python " vries at gcc dot gnu.org
2023-03-01 10:57 ` vries at gcc dot gnu.org
2023-03-01 10:58 ` vries at gcc dot gnu.org
2023-03-01 11:08 ` vries at gcc dot gnu.org
2023-03-01 11:29 ` markus.t.metzger at intel dot com
2023-03-01 11:44 ` vries at gcc dot gnu.org
2023-03-01 12:43 ` cvs-commit at gcc dot gnu.org
2023-03-01 12:44 ` vries at gcc dot gnu.org

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).