From: Kevin Buettner <kevinb@redhat.com>
To: Tom de Vries <tdevries@suse.de>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v3] [gdb/testsuite] New test: gdb.base/check-errno.exp
Date: Thu, 2 May 2024 09:02:37 -0700 [thread overview]
Message-ID: <20240502090237.69733376@f39-zbm-amd> (raw)
In-Reply-To: <6f42cbea-053c-4c49-b82b-428bf55ec101@suse.de>
On Thu, 2 May 2024 12:37:23 +0200
Tom de Vries <tdevries@suse.de> wrote:
> On 5/2/24 03:38, Kevin Buettner wrote:
> > Printing the value of 'errno' from GDB is sometimes problematic. The
> > situation has improved in recent years, though there are still
> > scenarios for which "print errno" doesn't work.
> >
> > The test, gdb.base/check-errno.exp, introduced by this commit,
> > tests whether or not GDB can print errno with a binary compiled
> > in the following different ways:
> >
> > - default: no switches aside from -g (and whatever else is added by the
> > testing framework)
> > - macros: macros included in the debuginfo; this is enabled by using
> > -g3 when using gcc or clang
> > - static: statically linked binary
> > - static-macros: statically linked binary w/ macro definitions included
> > in debuginfo
> > - pthreads: libpthread linked binary
> > - pthreads-macros: libpthread linked binary w/ macro definitions included
> > in debuginfo
> > - pthreads-static: Statically linked against libpthread
> > - pthreads-static-macros: Statically linked against libpthread w/ macro
> > definitions
>
> Hi,
>
> I applied the patch, and ran the test-case on leap 15.5.
>
> With glibc debuginfo installed, I get:
> ...
> FAIL: gdb.base/check-errno.exp: default: print errno
> FAIL: gdb.base/check-errno.exp: default: print (int) errno
> FAIL: gdb.base/check-errno.exp: default: check errno value from corefile
> FAIL: gdb.base/check-errno.exp: static: print errno
> FAIL: gdb.base/check-errno.exp: static: check errno value from corefile
> FAIL: gdb.base/check-errno.exp: pthreads-static: print errno
> FAIL: gdb.base/check-errno.exp: pthreads-static: check errno value from
> corefile
> ...
>
> Without glibc debuginfo installed, I get:
> ...
> FAIL: gdb.base/check-errno.exp: default: print (int) errno
> FAIL: gdb.base/check-errno.exp: static: print errno
> FAIL: gdb.base/check-errno.exp: static: check errno value from corefile
> FAIL: gdb.base/check-errno.exp: pthreads-static: print errno
> FAIL: gdb.base/check-errno.exp: pthreads-static: check errno value from
> corefile
> ...
>
> Then I ran it on tumbleweed.
>
> With and without glibc debuginfo installed, I get:
> ...
> FAIL: gdb.base/check-errno.exp: static: print errno
> FAIL: gdb.base/check-errno.exp: static: check errno value from corefile
> FAIL: gdb.base/check-errno.exp: pthreads-static: print errno
> FAIL: gdb.base/check-errno.exp: pthreads-static: check errno value from
> corefile
> ...
>
> Looking in more detail at the first two FAILs of leap 15.5 with glibc
> debug info installed, we have:
> ...
> (gdb) print errno^M
> Cannot find thread-local storage for process 2259, shared library
> /lib64/libc.so.6:^M
> Cannot find thread-local variables on this target^M
> (gdb) FAIL: gdb.base/check-errno.exp: default: print errno
> print (int) errno^M
> Cannot find thread-local storage for process 2259, shared library
> /lib64/libc.so.6:^M
> Cannot find thread-local variables on this target^M
> (gdb) FAIL: gdb.base/check-errno.exp: default: print (int) errno
> ...
>
> I think some of these are FAILs due to using a glibc version that
> doesn't have libpthreads merged. Leap 15.5 uses glibc 2.31.
> libpthreads was merged into libc in version 2.34. Current tumbleweed
> uses 2.39.
I can reproduce some of the above using old versions of Fedora. I'll
attempt to xfail those cases too.
> FWIW, in a fedora rawhide container I get:
> ...
> XPASS: gdb.base/check-errno.exp: static-macros: print (int) errno
> XPASS: gdb.base/check-errno.exp: pthreads-static-macros: print (int) errno
> ...
>
> That matches your description, but I think these xpasses shouldn't be there.
Based on bug 31693, which you recently filed, I agree. Those should
be FAILs. I'll update it so that those tests fail instead.
Thanks!
Kevin
next prev parent reply other threads:[~2024-05-02 16:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-02 1:38 Kevin Buettner
2024-05-02 1:45 ` Kevin Buettner
2024-05-02 10:37 ` Tom de Vries
2024-05-02 16:02 ` Kevin Buettner [this message]
2024-05-02 16:45 ` Tom de Vries
2024-05-02 17:39 ` Kevin Buettner
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=20240502090237.69733376@f39-zbm-amd \
--to=kevinb@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
/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