[PATCH roland/env-only] Avoid re-exec-self in bug-setlocale1.

Mike Frysinger vapier@gentoo.org
Fri Mar 6 19:40:00 GMT 2015


On 06 Mar 2015 18:52, Joseph Myers wrote:
> On Thu, 5 Mar 2015, Roland McGrath wrote:
> > I suspect that where we want to get to is that all tests run with a
> > completely controlled environment.  I can't really think of any reason why
> > any of our tests should be run with random ambient environment variables.
> > But I'm starting small.
> 
> Test scripts run on the build system certainly need variables such as PATH 
> to find utilities.
> 
> It may be that all test programs run on glibc's host never need to execute 
> any external utilities, so don't need PATH.  Some tests may create 
> temporary files in TMPDIR, though use of /tmp should be fine as long as 
> they use unique names (and if they don't, this needs fixing - bug 13888).  
> Some tests (e.g. glob expanding ~) depend on HOME, but setting values 
> local to the test directory may work.  Those seem the most likely 
> environment variable dependencies for tests.

wrt TMPDIR, it would be nice if the test runner managed a tempdir for the test.  
that way we don't have to worry:
 - whether the test properly cleans up after itself on exit/crash/interrupt;
   we can just assume it's always done for us and thus not have to even try
 - are we using the TMPDIR securely

this could be done to a degree in the test-skeleton
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20150306/195a91b2/attachment.sig>


More information about the Libc-alpha mailing list