public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Roland McGrath <roland@hack.frob.com>
To: Martin Galvan <martin.galvan@tallertechnologies.com>
Cc: libc-alpha@sourceware.org,
	Daniel Gutson <daniel.gutson@tallertechnologies.com>,
	"Carlos O'Donell" <carlos@redhat.com>,
	Siddhesh Poyarekar <sid@reserved-bit.com>,
	Tom Tromey <tom@tromey.com>
Subject: Re: [PATCH v5] Add pretty printers for the NPTL lock types
Date: Mon, 11 Apr 2016 22:17:00 -0000	[thread overview]
Message-ID: <20160411221656.65CB82C3B38@topped-with-meat.com> (raw)
In-Reply-To: Martin Galvan's message of  Monday, 11 April 2016 18:55:36 -0300 <CAOKbPbausROA=TM1K8Up=ttc9sHxaLtBWUsi7KPxDiS77+Jiig@mail.gmail.com>

> 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

  reply	other threads:[~2016-04-11 22:17 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-11 20:09 Martin Galvan
2016-04-11 20:38 ` Roland McGrath
2016-04-11 20:52   ` Martin Galvan
2016-04-11 21:31     ` Roland McGrath
2016-04-11 21:56       ` Martin Galvan
2016-04-11 22:17         ` Roland McGrath [this message]
2016-04-12  3:04           ` Siddhesh Poyarekar
2016-04-12  5:59             ` Siddhesh Poyarekar
2016-04-12 13:20               ` Martin Galvan
2016-04-12 14:55                 ` Martin Galvan
2016-04-12 15:59                   ` Siddhesh Poyarekar
2016-04-12 18:48                     ` Martin Galvan
2016-04-12 18:56                       ` Siddhesh Poyarekar
2016-04-12 19:05                         ` Martin Galvan
2016-04-12 21:28                           ` Martin Galvan
2016-04-18 14:10                             ` Martin Galvan
2016-04-20 12:44                               ` Martin Galvan
2016-04-25 21:59                                 ` Martin Galvan

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=20160411221656.65CB82C3B38@topped-with-meat.com \
    --to=roland@hack.frob.com \
    --cc=carlos@redhat.com \
    --cc=daniel.gutson@tallertechnologies.com \
    --cc=libc-alpha@sourceware.org \
    --cc=martin.galvan@tallertechnologies.com \
    --cc=sid@reserved-bit.com \
    --cc=tom@tromey.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).