public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Zack Weinberg <zackw@panix.com>
To: libc-alpha@sourceware.org
Subject: Re: [PATCH] extras: New test/build infrastructure
Date: Fri, 25 Nov 2016 16:14:00 -0000	[thread overview]
Message-ID: <1d0c74a4-965d-be13-6945-5af479eecbdc@panix.com> (raw)
In-Reply-To: <9426ee75-3e45-6cde-b659-567398007a32@redhat.com>

On 11/25/2016 10:59 AM, Florian Weimer wrote:
> I have split up test-skeleton.c into its components.  The new test
> skeleton should be compatible with compilation in C90 mode.  I expect to
> use some of these helper functions for future build support on the host
> (that is, these routines will have to be compiled twice, once against
> the built libc, and once against the host libc).

I support this general idea, especially the "not #including
test-skeleton.c anymore" part.

Can I ask why the new directory is called "extras"?  That makes it sound
like a home for extra features that we want to provide but not in the
core C library.  Something more obviously internal-use and
build/test-related would be better, I think.

(It looks like you've set it up so libextras is not installed, so that's
not a concern.)

> I do not propose bulk migration at this point.  Some obscure use cases
> are not supported by the exported hooks.

Could you give an example?

> +libextras-static-only-routines := $(libextras-routines)
> +# Only build one variant of the library.
> +libextras-inhibit-o := .os
> +ifeq ($(build-shared),yes)
> +libextras-inhibit-o += .o
> +endif

This doesn't look right if the goal is to build only the .a version of
the library.

> +#ifndef EXTRAS_CHECK_H
> +#define EXTRAS_CHECK_H
> +
> +#include <features.h>
> +
> +__BEGIN_DECLS
> +
> +/* Print failure message to standard output and return 1.  */
> +#define FAIL_RET(...) \
> +  return __extras_print_failure (__FILE__, __LINE__, __VA_ARGS__)

This library is _not_ part of the implementation and should not be using
__ names.  And I'm not sure it ought to be using features.h either.

(I haven't looked over extras/*.c in detail since I assume that these
are existing code copied out of test-skeleton.c.)

zw


  reply	other threads:[~2016-11-25 16:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-25 15:59 Florian Weimer
2016-11-25 16:14 ` Zack Weinberg [this message]
2016-11-25 17:11   ` Andreas Schwab
2016-11-25 17:46     ` Florian Weimer
2016-11-25 17:45   ` Florian Weimer
2016-11-25 18:44     ` Zack Weinberg
2016-11-25 18:49       ` Florian Weimer
2016-11-25 16:16 ` Florian Weimer
2016-11-25 17:29 ` Joseph Myers
2016-11-25 17:48   ` Florian Weimer
2016-11-25 18:24     ` Joseph Myers
2016-11-25 19:26       ` Florian Weimer

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=1d0c74a4-965d-be13-6945-5af479eecbdc@panix.com \
    --to=zackw@panix.com \
    --cc=libc-alpha@sourceware.org \
    /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).