public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/31310] New: [gdb/testsuite] FAIL: gdb.base/siginfo-thread.exp: extract si_errno
@ 2024-01-29 15:41 vries at gcc dot gnu.org
  0 siblings, 0 replies; only message in thread
From: vries at gcc dot gnu.org @ 2024-01-29 15:41 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 31310
           Summary: [gdb/testsuite] FAIL: gdb.base/siginfo-thread.exp:
                    extract si_errno
           Product: gdb
           Version: 13.1
            Status: NEW
          Severity: normal
          Priority: P2
         Component: testsuite
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

With gdb 13.2-based package, on s390x-linux I ran into:
...
2 = {si_signo = 11, si_errno = -701448376, si_code = 2, _sifields = {_pad =
{1023, -33583104, 0, 18018696, 0, 688795888, 1023, -606613560, 0, 0, 0, 1, 0,
690096224, 0, 0, 1023, -1732204328, 1023, -1733240784, 1023, -606614648, 0,
688638048, 0, 688854112, 0, 30292512}, _kill = {si_pid = 1023, si_uid =
4261384192}, _timer = {si_tid = 1023, si_overrun = -33583104, si_sigval =
{sival_int = 0, sival_ptr = 0x112f188}}, _rt = {si_pid = 1023, si_uid =
4261384192, si_sigval = {sival_int = 0, sival_ptr = 0x112f188}}, _sigchld =
{si_pid = 1023, si_uid = 4261384192, si_status = 0, si_utime =
77389710036566016, si_stime = 2958355812579279871}, _sigfault = {si_addr =
0x3fffdff9000}, _sigpoll = {si_band = 4398012928000, si_fd = 0}, _sigsys =
{_call_addr = 0x3fffdff9000, _syscall = 0, _arch = 18018696}}}^M
(gdb) FAIL: gdb.base/siginfo-thread.exp: extract si_errno
...

This fails because errno is matched using:
...
set test "extract si_errno"
gdb_test_multiple "p \$_siginfo" "$test" {
    -re "si_errno = (\[0-9\]\+).*$gdb_prompt $" {
        set ssi_errno $expect_out(1,string)
        pass "$test"
    }
}
...
which doesn't account for the possibility that errno is negative.

In linux_get_siginfo_type_with_fields I see:
...
  append_composite_type_field (siginfo_type, "si_errno", int_type);
...
so I guess that should be permitted.

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-29 15:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-29 15:41 [Bug testsuite/31310] New: [gdb/testsuite] FAIL: gdb.base/siginfo-thread.exp: extract si_errno 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).