Hi,
I've been trying to tackle some of the issues we have when trying to run some process tests (through winetest.exe, see also http://test.winehq.org/data):
process.c:775: Test failed: CreateProcess (./kernel32_test.exe tests/process.c C:\TEMP\wt44.tmp "a"b\" c" d) failed : 2 process.c:777: Test failed: Child process termination process.c:781: Test failed: Arguments:argvA0 expected './kernel32_test.exe', got '(null)' process.c:790: Test failed: CreateProcess (.\kernel32_test.exe tests/process.c C:\TEMP\wt45.tmp "a"b\" c" d) failed : 2 process.c:792: Test failed: Child process termination process.c:796: Test failed: Arguments:argvA0 expected '.\kernel32_test.exe', got '(null)' process.c:810: Test failed: CreateProcess (..\wct12/kernel32_test.exe tests/process.c C:\TEMP\wt46.tmp "a"b\" c" d) failed : 2 process.c:812: Test failed: Child process termination process.c:816: Test failed: Arguments:argvA0 expected '..\wct12/kernel32_test.exe', got '(null)'
The reason for this particular one is that I'm running winetest.exe started from a command-file on my desktop. This means that the current directory is the desktop directory. The winetest gui shows that the working directory is (in this case) c:\temp\wct12. This value is however not passed to the tests when CreateProcess is run:
main.c:
291 if (!CreateProcessA (NULL, cmd, NULL, NULL, TRUE, 0, 292 NULL, NULL, &si, &pi)) {
The above means that the kernel32_test.exe has a working directory that is not c:\temp\wct12 (in this case again) and thus cannot find the executable when referenced relatively.
All the test-results that are shown on http://test.winehq.org show more-or-less the same behavior.
How can I retrieve the correct working directory (as shown in the winetest gui) and pass that to the single tests? (I think that would solve these particular issues).
Cheers and thanks for any pointers,
Paul.
Paul Vriens a écrit :
Hi,
I've been trying to tackle some of the issues we have when trying to run some process tests (through winetest.exe, see also http://test.winehq.org/data):
everything is already computed... the global variable base is what you seem to be looking for A+
On Mon, 2007-01-01 at 15:10 +0100, Eric Pouech wrote:
Paul Vriens a écrit :
Hi,
I've been trying to tackle some of the issues we have when trying to run some process tests (through winetest.exe, see also http://test.winehq.org/data):
everything is already computed... the global variable base is what you seem to be looking for A+
Unfortunately not. base is the start-directory (which in my case was the desktop) and not the working-directory.
I'll have another look in a few days.
Cheers,
Paul.
Paul Vriens paul.vriens.wine@gmail.com writes:
The winetest gui shows that the working directory is (in this case) c:\temp\wct12. This value is however not passed to the tests when CreateProcess is run:
main.c:
291 if (!CreateProcessA (NULL, cmd, NULL, NULL, TRUE, 0, 292 NULL, NULL, &si, &pi)) {
,--------------------------^ MSDN: If this parameter is NULL, the new process will have the same current drive and directory as the calling process.
The CreateProcess documentation is rather convoluted, though. The first NULL also seems risky on first read.
On Mon, 2007-01-01 at 16:25 +0100, Wagner Ferenc wrote:
Paul Vriens paul.vriens.wine@gmail.com writes:
The winetest gui shows that the working directory is (in this case) c:\temp\wct12. This value is however not passed to the tests when CreateProcess is run:
main.c:
291 if (!CreateProcessA (NULL, cmd, NULL, NULL, TRUE, 0, 292 NULL, NULL, &si, &pi)) {
,--------------------------^
MSDN: If this parameter is NULL, the new process will have the same current drive and directory as the calling process.
The CreateProcess documentation is rather convoluted, though. The first NULL also seems risky on first read.
That was exactly my point when putting in that piece of code :-).
This also means (me thinks) that the start-directory is used instead of the working-directory.
Another approach would be to have winetest change the directory to the working directory.
Cheers,
Paul.
Paul Vriens paul.vriens.wine@gmail.com writes:
On Mon, 2007-01-01 at 16:25 +0100, Wagner Ferenc wrote:
Paul Vriens paul.vriens.wine@gmail.com writes:
The winetest gui shows that the working directory is (in this case) c:\temp\wct12. This value is however not passed to the tests when CreateProcess is run:
main.c:
291 if (!CreateProcessA (NULL, cmd, NULL, NULL, TRUE, 0, 292 NULL, NULL, &si, &pi)) {
,--------------------------^
MSDN: If this parameter is NULL, the new process will have the same current drive and directory as the calling process.
The CreateProcess documentation is rather convoluted, though. The first NULL also seems risky on first read.
That was exactly my point when putting in that piece of code :-).
This also means (me thinks) that the start-directory is used instead of the working-directory.
Another approach would be to have winetest change the directory to the working directory.
I was under the impression that winetest changed its working directory to the temporary directory it creates. Looks like it does not, probably so that it can remove the directory in the end. Either main()'s tempdir variable should be passed to run_test() and later to run_ex() for passing to CreateProcessA(), or the working directory should be changed after creating and before removing it in main(), I guess.