This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PING 2][PATCH v3] Add pretty printers for the NPTL lock types
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Florian Weimer <fweimer at redhat dot com>, Martin Galvan <martin dot galvan at tallertechnologies dot com>, libc-alpha at sourceware dot org, tom at tromey dot com, triegel at redhat dot com, palves at redhat dot com, vapier at gentoo dot org, daniel dot gutson at tallertechnologies dot com
- Date: Fri, 5 Feb 2016 11:19:52 -0500
- Subject: Re: [PING 2][PATCH v3] Add pretty printers for the NPTL lock types
- Authentication-results: sourceware.org; auth=none
- References: <1447768994-5368-1-git-send-email-martin dot galvan at tallertechnologies dot com> <564B4DE4 dot 7010306 at redhat dot com>
On 11/17/2015 10:55 AM, Florian Weimer wrote:
> On 11/17/2015 03:03 PM, Martin Galvan wrote:
>> This patch adds the pretty-printers for the following NPTL types:
>>
>> - pthread_mutex_t
>> - pthread_mutexattr_t
>> - pthread_cond_t
>> - pthread_condattr_t
>> - pthread_rwlock_t
>> - pthread_rwlockattr_t
>
> Is there a test for this somewhere? Can it be put into glibc?
>
> I'm worried that these helpers break the debugging experience at some
> point, and we would like to catch that early. A test in glibc proper
> would help with that.
Agreed. This needs testing.
You need to:
- Create a test script that is run as a test.
- The test script needs to check for gdb, this can't
be done at host configure time because the test script
might be run on a remote host for cross-testing via the
test wrapper.
- If gdb is not present on the target then fail with
UNSUPPORTED (not sure if this is possible, we usually
mark unsupported testes by putting them into a special
Make variable).
- If gdb is present then run it with a script (-x) and
do some printing tests of various initialized mutexes
and a test program, and then compare that to expected
data (store the expected data in a file if you want)
and return PASS or FAIL.
Cheers,
Carlso.