[kernel32/tests] More traces in case of failures

Paul Vriens paul.vriens.wine at gmail.com
Fri Dec 22 09:02:42 CST 2006


Hi,

I'm still not able to build a full winetest.exe myself as crosstesting fails
at several places.

The tests show there is still an issue with the execution of some of the
commandlines. Added some more traces to see if we are really in the directory
we think we are.

We currently call CreateProcess with lpCurrentDirectory set to NULL, which
should inherit the path and drive from the calling process. 

Changelog
  More traces in case of failures

Cheers,

Paul.
---
 dlls/kernel32/tests/process.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/dlls/kernel32/tests/process.c b/dlls/kernel32/tests/process.c
index 52251a6..31c29cf 100644
--- a/dlls/kernel32/tests/process.c
+++ b/dlls/kernel32/tests/process.c
@@ -721,6 +721,9 @@ static void test_CommandLine(void)
     STARTUPINFOA	startup;
     DWORD               len;
     BOOL                ret;
+    static char         curdir[MAX_PATH];
+
+    GetCurrentDirectoryA(sizeof(curdir), curdir);
 
     memset(&startup, 0, sizeof(startup));
     startup.cb = sizeof(startup);
@@ -773,6 +776,8 @@ static void test_CommandLine(void)
     SetLastError(0xdeadbeef);
     ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info);
     ok(ret, "CreateProcess (%s) failed : %d\n", buffer, GetLastError());
+    if (!ret)
+        trace("Base directory : (%s), Current directory : (%s)\n", base, curdir);
     /* wait for child to terminate */
     ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n");
     /* child process has changed result file, so let profile functions know about it */
@@ -788,6 +793,8 @@ static void test_CommandLine(void)
     SetLastError(0xdeadbeef);
     ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info);
     ok(ret, "CreateProcess (%s) failed : %d\n", buffer, GetLastError());
+    if (!ret)
+        trace("Base directory : (%s), Current directory : (%s)\n", base, curdir);
     /* wait for child to terminate */
     ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n");
     /* child process has changed result file, so let profile functions know about it */
@@ -808,6 +815,8 @@ static void test_CommandLine(void)
     SetLastError(0xdeadbeef);
     ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info);
     ok(ret, "CreateProcess (%s) failed : %d\n", buffer, GetLastError());
+    if (!ret)
+        trace("Base directory : (%s), Current directory : (%s)\n", base, curdir);
     /* wait for child to terminate */
     ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n");
     /* child process has changed result file, so let profile functions know about it */
-- 
1.4.4.3




More information about the wine-patches mailing list