This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PING][PATCH v9] Add pretty printers for the NPTL lock types


Hi all! Before I forget, in the future please CC me directly because
sometimes I miss the mailing list digests. Thanks!

On Mon, Jul 11, 2016 at 12:00 PM, Siddhesh Poyarekar
<siddhesh@sourceware.org> wrote:
> On Mon, Jul 11, 2016 at 03:16:19PM +0200, Stefan Liebler wrote:
>> On that machine, I have installed python-pexpect-3.1-1.fc20.noarch.
>> I've tried python2-pexpect-4.0.1-4.fc23.noarch on another machine and you
>> are right, the "echo=False" issue does not appear.
>>
>> But I get fails:
>> FAIL: pretty-printers/test-condvar-attributes-pp:
>> Error: Response does not match the expected pattern.
>> Command: print *attr
>> Expected pattern: pthread_condattr_t
>> Response: Python Exception <class 'gdb.error'> No struct type named
>> pthread_condattr.:
>>
>> Python Exception <class 'gdb.error'> No struct type named pthread_condattr.:
>>
>> $3 = {__size = "\000\000\000", __align = 0}
> <snip>
>> The gdb version is gdb-7.10.1-30.fc23.s390x.
>
> That's odd, it looks like the pretty printer is still not registered.
> Have you set up your gdbinit to register the printer?

To me it sounds like gdb.lookup_type not finding the struct types
representing the attributes. I'm not sure what could be causing that;
I've tested it with gdb 7.7 and 7.11 in x86_64, and 7.7 in ARM and it
always worked fine. Could you at least test it in x86?

>> Nevertheless is it possible to check the correct versions and warn
>> at configuring or mark the tests as unsupported if pexpect is not installed
>> or you have the false version?

I wasn't aware of versioning issues on PExpect. FWIW I saw that the
module has a __version__ attribute, so we could set a minimum version
(4.0.1 maybe?) and mark the tests as UNSUPPORTED if our version is
lower. It would require a bit of string parsing but it should be
relatively easy to do.

> Martin, so things for you to work on for the next iteration of the
> patch:
>
> 1. Redirect test output to a file like other tests

Done.

> 2. Eliminate the need to use a .gdbinit because distributions will
>    break without it.  I should have caught that but I was in too much
>    of a hurry to get the patch in :/

Working on it.

> 3. Feature checking during configure to determine things like minimum
>    required gdb version, python-pexpect version, etc. to make sure
>    that tests work correctly.

I'd rather set a minimum version and check for it at runtime as I said
above. I'm not messing with configure scripts for this contribution.

> You can split this into a series of patches, one with what you have
> now (with the output redirection fixed), a second that eliminates
> gdbinit use and a third that adds the configure checks.

They'd still have to be pushed at the same time, wouldn't they? I
don't see the point on splitting it unless you're willing to push the
first version now, and then (after whatever time takes me) the
.gdbinit one, as we were planning to do with the install code. In any
case, I'd rather have a working, testable version in 2.23 than
something halfway done.

As for Stefan's suggestion that this should work with all versions of
PExpect: that would probably take me a really long time, and I don't
know if it'd be worth it. While I'm not using most of the features
PExpect gives you, I'd still have to work around API changes, bugs and
whatnot.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]