True. So what we need is to add a function in the
testing framework
so that tests can get argc/argv/envp. Seems like a
reasonable approach. I was more thinking adding some wt_argc and wt_argv, with init in main so that we don't have to deal with the portability issues of the __argc, __ ARGC...
Is there a reason we can't just use environment variables rather than argc/argv? I would think that would be less of a hassle than using argc/argv.
.Geoff
----------------------------------------------------- Protect yourself from spam, use http://sneakemail.com
Geoffrey Hausheer a écrit :
True. So what we need is to add a function in the
testing framework
so that tests can get argc/argv/envp. Seems like a
reasonable approach. I was more thinking adding some wt_argc and wt_argv, with init in main so that we don't have to deal with the portability issues of the __argc, __ ARGC...
Is there a reason we can't just use environment variables rather than argc/argv? I would think that would be less of a hassle than using argc/argv.
on the same address space across several threads, no need for env variables, all the threads share the same address space
when between two processes, then the argc/argv is passed anyway (arguments to main) the only place where you could need then is for testing in child that you get the correct strings (see exchanges with François around this)
On 29 Mar 2002, Geoffrey Hausheer wrote:
True. So what we need is to add a function in the
testing framework
so that tests can get argc/argv/envp. Seems like a
reasonable approach. I was more thinking adding some wt_argc and wt_argv, with init in main so that we don't have to deal with the portability issues of the __argc, __ ARGC...
Is there a reason we can't just use environment variables rather than argc/argv? I would think that would be less of a hassle than using argc/argv.
The goal of some of these tests is precisely to check that what you get in argc/argv is what you expect. For instance, if the command line specified to CreateProcess is ... "a"b\" c" d you would expect: argv[1] = [a"b] argv[2] = [c"] argv[3] = [d]
That would be hard to check without accessing argc/argv in some way.
-- Francois Gouget fgouget@free.fr http://fgouget.free.fr/ Any sufficiently advanced Operating System is indistinguishable from Linux