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] extras: New test/build infrastructure


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



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