From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 45110 invoked by alias); 25 Jun 2018 23:09:39 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 45098 invoked by uid 89); 25 Jun 2018 23:09:38 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 spammy= X-HELO: albireo.enyo.de From: Florian Weimer To: DJ Delorie Cc: libc-alpha@sourceware.org Subject: Re: RFC V3 [1/2] test-in-container References: Date: Mon, 25 Jun 2018 23:09:00 -0000 In-Reply-To: (DJ Delorie's message of "Mon, 25 Jun 2018 18:58:27 -0400") Message-ID: <87k1qm31ld.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2018-06/txt/msg00770.txt.bz2 * DJ Delorie: > Florian Weimer 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.