This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin 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: new blood


On Sat, Apr 30, 2005 at 05:18:04PM -0700, Brian Dessent wrote:
>Christopher Faylor wrote:
>
>> Couldn't you just write a helper app that calls both GetEnvironmentVariable
>> and getenv to make sure that SYSTEMROOT exist and are equal to each
>> other?
>
>Yep, I'd thought of that too.  It still requires the helper app, though, which is
>the part I was unsure of.

AFAICT, you'd need one cygwin app and one mingw app.  I don't know if the test suite
can build mingw apps now.  Probably not.  Getting different command line options
to gcc might be tricky.

>Alternatively, could the testcase exec() itself as the child process, and pass
>something in the arguments (or perhaps a different argv[0]) to indicate this?  It
>could then determine if it's being invoked as the testcase or as the helper.

That's what I was thinking.  I think other tests do this.

>> You'd also want to make sure that if the parent resets SYSTEMROOT, that
>> is what gets passed on -- not the derived value.
>
>Okay.
>
>> And, you'd want to check that PATH always exists in the child's windows
>> environment iff it exists in the parent and that the child/parent agree
>> on the value of PATH.
>
>Okay, so compare the win32 value of PATH in both and make sure it's inherited.  And
>if the parent has cleared its PATH (or uses execve() without PATH set in envp) then
>the child is to have no PATH, correct?

The parent could also set SYSTEMROOT (and PATH) to something else.  In the SYSTEMROOT
case you have to make sure that the SYSTEMROOT isn't being erroneously regenerated. So
you'd have to start the app with a command line argument indicating what to expect
and check SYSTEMROOT against that.

This is a lot trickier than I thought it would be.  The number of
combinations involved in testing all of this is pretty high.

cgf


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