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: [PATCH v5] Add pretty printers for the NPTL lock types


> I thought Depend took care of that. 

Only in the wrongest possible way.

> In any case, Sid remarked that It would be clumsy to have the printers in
> different module directories now and then putting them all into the same
> directory during installation. 

It's no different from header files and libraries, which all go into the
same installation directories.

> It also makes sense to have them tested separately through a single
> Makefile, and it's the right place to put things like test_common.py and
> the pretty printers README.

You can certainly have some common infrastructure code for both the
pretty-printer implementations and for their tests.  It might well be fine
to have a subdir for that common infrastructure code.  But anything
actually related to a particular type must reside in the subdir responsible
for the definition of that type.

> It's a technical issue, actually, and it's explained in all the test
> programs. Basically, I saw that having 'if' conditions split in more
> than one line seems to confuse gdb to the point where we need to issue
> a (somewhat random) number of 'next' commands to advance. This
> complicates testing quite a bit.

This suggests to me that the testing methodology is a poor choice.  I'd
have to review what you've done in more detail to know what I think is the
best approach.  I suspect that using "next" (or "step", etc.) in tests like
this is just a bad idea altogether (as opposed to only using explicit
breakpoints).  If it turns out that using "next" over an "if" is an
important thing to be able to do, then put the complex condition into an
inline or macro.

> Ok. Is it ok if I place a single line of comment above the license,
> then leave a more detailed explanation below it? E.g. for
> nptl-printers.py we'd have:
> 
> # Pretty printers for the NPTL lock types.
> # Copyright (C) 2016 Free Software Foundation, Inc.

That is exactly what we require.
The top comment should usually be only one line.


Thanks,
Roland


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