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: RFC V3 [1/2] test-in-container


* DJ Delorie:

> Florian Weimer <fweimer@redhat.com> writes:
>> On 03/02/2018 12:05 AM, DJ Delorie wrote:
>>> +CFLAGS-test-container.c = \
>>> +		-DSRCDIR_PATH=\"`cd .. ; pwd`\" \
>>> +		-DOBJDIR_PATH=\"`cd $(objpfx)/..; pwd`\" \
>>> +		-DINSTDIR_PATH=\"${prefix}\" \
>>> +		-DLIBDIR_PATH=\"${libdir}\"
>>
>>
>> I think OBJDIR_PATH could be $(objdir).
>
> That would put the testroot itself under support/

Are you sure?  $(objdir) is used to define $(common-objpfx), after
all.

> There's nothing under support/ needed by test-container.c, but many
> things in the root (like elf/*) that are.
>
> And they need to be absolute (resolved) as symlinks might not work
> inside the container, where only part of the filesystem exists and $PWD
> may differ.

You could bind mount in the container with the same path as outside
the container.

>> Could you add variables (maybe support_srcdir, support_objdir, 
>> support_prefix, support_libdir) to a separate file under support/ and 
>> add matching declarations, perhaps in support/support.h?  This looks 
>> generally useful to me.
>
> Useful to what?  And is this usefulness based on them being pointers to
> the support subdirectory, or the toplevel build directory?

Useful for launching statically linked programs, for example.
Currently, we need to pass in $(common-objpfx) from Makefile.  See
tst-getdate-ENV in time/Makefile for an example.  Or the construct
around tst-support_record_failure-2.out in support/Makefile.


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