Trace the temporary directory value on startup since it's no longer visible in the failure messages.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- dlls/shell32/tests/shlexec.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/dlls/shell32/tests/shlexec.c b/dlls/shell32/tests/shlexec.c index 030ab54525a..e884b409493 100644 --- a/dlls/shell32/tests/shlexec.c +++ b/dlls/shell32/tests/shlexec.c @@ -507,7 +507,14 @@ static INT_PTR shell_execute_(const char* file, int line, LPCSTR verb, LPCSTR fi
strcpy(shell_call, "ShellExecute("); strcat_param(shell_call, "verb", verb); - strcat_param(shell_call, "file", filename); + if (strncmp(filename, tmpdir, strlen(tmpdir)) != 0) + strcat_param(shell_call, "file", filename); + else + { + char buffer[MAX_PATH]; + sprintf(buffer, "tmpdir%s", filename + strlen(tmpdir)); + strcat_param(shell_call, "file", buffer); + } strcat_param(shell_call, "params", parameters); strcat_param(shell_call, "dir", directory); strcat(shell_call, ")"); @@ -591,7 +598,14 @@ static INT_PTR shell_execute_ex_(const char* file, int line, sprintf(smask, "0x%x", mask); strcat_param(shell_call, "mask", smask); strcat_param(shell_call, "verb", verb); - strcat_param(shell_call, "file", filename); + if (strncmp(filename, tmpdir, strlen(tmpdir)) != 0) + strcat_param(shell_call, "file", filename); + else + { + char buffer[MAX_PATH]; + sprintf(buffer, "<tmpdir>%s", filename + strlen(tmpdir)); + strcat_param(shell_call, "file", buffer); + } strcat_param(shell_call, "params", parameters); strcat_param(shell_call, "dir", directory); strcat_param(shell_call, "class", class); @@ -2705,6 +2719,7 @@ static void init_test(void) ok( rc, "failed to create %s err %u\n", tmpdir, GetLastError() ); /* Set %TMPDIR% for the tests */ SetEnvironmentVariableA("TMPDIR", tmpdir); + trace("tmpdir="%s"\n", tmpdir);
rc = GetTempFileNameA(tmpdir, "wt", 0, child_file); ok(rc != 0, "got %d\n", rc);
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=67160
Your paranoid android.
=== w1064v1507 (32 bit report) ===
shell32: shlexec.c:2485: Test failed: ShellExecuteEx(mask="0x2008540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail="", ddeexec="[open("%1")]", app="shlexec", topic="dde" ddeExec expected '[open("C:\Users\winetest\AppData\Local\Temp\wtB4F8.tmp\test file.sde")]', got ''
=== w1064v1809 (32 bit report) ===
shell32: shlexec.c:2485: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail="", ddeexec="[open("%1")]", app="shlexec", topic="dde" ddeExec expected '[open("C:\Users\winetest\AppData\Local\Temp\wtEE86.tmp\test file.sde")]', got '' shlexec.c:2485: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail=""%1"", ddeexec="[open("%1")]", app="shlexec", topic="dde" ddeExec expected '[open("C:\Users\winetest\AppData\Local\Temp\wtEE86.tmp\test file.sde")]', got '' shlexec.c:2485: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail="%1", ddeexec="[open(%1)]", app="shlexec", topic="dde" ddeExec expected '[open(C:\Users\winetest\AppData\Local\Temp\wtEE86.tmp\test file.sde)]', got '' shlexec.c:2485: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail="", ddeexec="[open("%1")]", app="shlexec", topic="dde", ifexec="[ifexec("%1")]" ddeExec expected '[ifexec("C:\Users\winetest\AppData\Local\Temp\wtEE86.tmp\test file.sde")]', got '' shlexec.c:2485: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail="", ddeexec="[open("%1")]", app="shlexec" ddeExec expected '[open("C:\Users\winetest\AppData\Local\Temp\wtEE86.tmp\test file.sde")]', got '' shlexec.c:2485: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail="", ddeexec="[open("%1")]", topic="dde" ddeExec expected '[open("C:\Users\winetest\AppData\Local\Temp\wtEE86.tmp\test file.sde")]', got ''
=== w1064v1809_2scr (32 bit report) ===
shell32: shlexec.c:2485: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail="", ddeexec="[open("%1")]", app="shlexec", topic="dde" ddeExec expected '[open("C:\Users\winetest\AppData\Local\Temp\wtFA3E.tmp\test file.sde")]', got '' shlexec.c:2485: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail=""%1"", ddeexec="[open("%1")]", app="shlexec", topic="dde" ddeExec expected '[open("C:\Users\winetest\AppData\Local\Temp\wtFA3E.tmp\test file.sde")]', got '' shlexec.c:2485: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail="%1", ddeexec="[open(%1)]", app="shlexec", topic="dde" ddeExec expected '[open(C:\Users\winetest\AppData\Local\Temp\wtFA3E.tmp\test file.sde)]', got '' shlexec.c:2485: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail="", ddeexec="[open("%1")]", app="shlexec", topic="dde", ifexec="[ifexec("%1")]" ddeExec expected '[ifexec("C:\Users\winetest\AppData\Local\Temp\wtFA3E.tmp\test file.sde")]', got '' shlexec.c:2485: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail="", ddeexec="[open("%1")]", app="shlexec" ddeExec expected '[open("C:\Users\winetest\AppData\Local\Temp\wtFA3E.tmp\test file.sde")]', got '' shlexec.c:2485: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail="", ddeexec="[open("%1")]", topic="dde" ddeExec expected '[open("C:\Users\winetest\AppData\Local\Temp\wtFA3E.tmp\test file.sde")]', got ''
=== w1064v1809_ar (32 bit report) ===
shell32: shlexec.c:2485: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail="", ddeexec="[open("%1")]", app="shlexec", topic="dde" ddeExec expected '[open("C:\Users\winetest\AppData\Local\Temp\wt2D45.tmp\test file.sde")]', got '' shlexec.c:2485: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail=""%1"", ddeexec="[open("%1")]", app="shlexec", topic="dde" ddeExec expected '[open("C:\Users\winetest\AppData\Local\Temp\wt2D45.tmp\test file.sde")]', got '' shlexec.c:2449: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail="%1", ddeexec="[open(%1)]", app="shlexec", topic="dde" WaitForSingleObject(hProcess) returned 258 shlexec.c:2485: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail="%1", ddeexec="[open(%1)]", app="shlexec", topic="dde" ddeExec expected '[open(C:\Users\winetest\AppData\Local\Temp\wt2D45.tmp\test file.sde)]', got '' shlexec.c:2485: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail="", ddeexec="[open("%1")]", app="shlexec", topic="dde", ifexec="[ifexec("%1")]" ddeExec expected '[ifexec("C:\Users\winetest\AppData\Local\Temp\wt2D45.tmp\test file.sde")]', got '' shlexec.c:2485: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail="", ddeexec="[open("%1")]", app="shlexec" ddeExec expected '[open("C:\Users\winetest\AppData\Local\Temp\wt2D45.tmp\test file.sde")]', got '' shlexec.c:2485: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail="", ddeexec="[open("%1")]", topic="dde" ddeExec expected '[open("C:\Users\winetest\AppData\Local\Temp\wt2D45.tmp\test file.sde")]', got '' shlexec.c:2868: Test failed: ShellExecuteEx(mask="0x808640", file="test2.exe", params="shlexec "C:\Users\winetest\AppData\Local\Temp\wt2D45.tmp\wt2D74.tmp" Exec", dir="%TMPDIR%") WaitForSingleObject(hProcess) returned 258 shlexec.c:2868: Test failed: ShellExecuteEx(mask="0x808640", file="test2.exe", params="shlexec "C:\Users\winetest\AppData\Local\Temp\wt2D45.tmp\wt2D74.tmp" Exec", dir="%TMPDIR%") child returned 259
=== w1064v1809_ar (testbot log) ===
The task timed out
=== w1064v1809_he (32 bit report) ===
shell32: shlexec.c:2449: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail="", ddeexec="[open("%1")]", app="shlexec", topic="dde" WaitForSingleObject(hProcess) returned 258 shlexec.c:2449: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail="", ddeexec="[open("%1")]", app="shlexec", topic="dde" child returned 259 shlexec.c:2485: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail="", ddeexec="[open("%1")]", app="shlexec", topic="dde" ddeExec expected '[open("C:\Users\winetest\AppData\Local\Temp\wt18F1.tmp\test file.sde")]', got '' shlexec.c:2485: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail=""%1"", ddeexec="[open("%1")]", app="shlexec", topic="dde" ddeExec expected '[open("C:\Users\winetest\AppData\Local\Temp\wt18F1.tmp\test file.sde")]', got '' shlexec.c:2485: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail="%1", ddeexec="[open(%1)]", app="shlexec", topic="dde" ddeExec expected '[open(C:\Users\winetest\AppData\Local\Temp\wt18F1.tmp\test file.sde)]', got '' shlexec.c:2485: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail="", ddeexec="[open("%1")]", app="shlexec", topic="dde", ifexec="[ifexec("%1")]" ddeExec expected '[ifexec("C:\Users\winetest\AppData\Local\Temp\wt18F1.tmp\test file.sde")]', got ''
=== w1064v1809_he (testbot log) ===
The task timed out
=== w1064v1809_ja (32 bit report) ===
shell32: shlexec.c:1660: Test failed: ShellExecute(file="tmpdir%nasty% $file.shlexec") WaitForSingleObject returned 258 shlexec.c:2485: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail="", ddeexec="[open("%1")]", app="shlexec", topic="dde" ddeExec expected '[open("C:\Users\winetest\AppData\Local\Temp\wt1325.tmp\test file.sde")]', got '' shlexec.c:2485: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail=""%1"", ddeexec="[open("%1")]", app="shlexec", topic="dde" ddeExec expected '[open("C:\Users\winetest\AppData\Local\Temp\wt1325.tmp\test file.sde")]', got '' shlexec.c:2449: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail="%1", ddeexec="[open(%1)]", app="shlexec", topic="dde" WaitForSingleObject(hProcess) returned 258 shlexec.c:2449: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail="%1", ddeexec="[open(%1)]", app="shlexec", topic="dde" child returned 259 shlexec.c:2485: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail="%1", ddeexec="[open(%1)]", app="shlexec", topic="dde" ddeExec expected '[open(C:\Users\winetest\AppData\Local\Temp\wt1325.tmp\test file.sde)]', got '' shlexec.c:2485: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail="", ddeexec="[open("%1")]", app="shlexec", topic="dde", ifexec="[ifexec("%1")]" ddeExec expected '[ifexec("C:\Users\winetest\AppData\Local\Temp\wt1325.tmp\test file.sde")]', got '' shlexec.c:2485: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail="", ddeexec="[open("%1")]", app="shlexec" ddeExec expected '[open("C:\Users\winetest\AppData\Local\Temp\wt1325.tmp\test file.sde")]', got '' shlexec.c:2485: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail="", ddeexec="[open("%1")]", topic="dde" ddeExec expected '[open("C:\Users\winetest\AppData\Local\Temp\wt1325.tmp\test file.sde")]', got ''
=== w1064v1809_ja (testbot log) ===
The task timed out
=== w1064v1809_zh_CN (32 bit report) ===
shell32: shlexec.c:2485: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail="", ddeexec="[open("%1")]", app="shlexec", topic="dde" ddeExec expected '[open("C:\Users\winetest\AppData\Local\Temp\wt1B43.tmp\test file.sde")]', got '' shlexec.c:2485: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail=""%1"", ddeexec="[open("%1")]", app="shlexec", topic="dde" ddeExec expected '[open("C:\Users\winetest\AppData\Local\Temp\wt1B43.tmp\test file.sde")]', got '' shlexec.c:2485: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail="%1", ddeexec="[open(%1)]", app="shlexec", topic="dde" ddeExec expected '[open(C:\Users\winetest\AppData\Local\Temp\wt1B43.tmp\test file.sde)]', got '' shlexec.c:2485: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail="", ddeexec="[open("%1")]", app="shlexec", topic="dde", ifexec="[ifexec("%1")]" ddeExec expected '[ifexec("C:\Users\winetest\AppData\Local\Temp\wt1B43.tmp\test file.sde")]', got '' shlexec.c:2485: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail="", ddeexec="[open("%1")]", app="shlexec" ddeExec expected '[open("C:\Users\winetest\AppData\Local\Temp\wt1B43.tmp\test file.sde")]', got '' shlexec.c:2485: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail="", ddeexec="[open("%1")]", topic="dde" ddeExec expected '[open("C:\Users\winetest\AppData\Local\Temp\wt1B43.tmp\test file.sde")]', got '' shlexec: Timeout
=== w1064v1809 (64 bit report) ===
shell32: shlexec.c:2485: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail="", ddeexec="[open("%1")]", app="shlexec", topic="dde" ddeExec expected '[open("C:\Users\winetest\AppData\Local\Temp\wtEEE4.tmp\test file.sde")]', got '' shlexec.c:2485: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail=""%1"", ddeexec="[open("%1")]", app="shlexec", topic="dde" ddeExec expected '[open("C:\Users\winetest\AppData\Local\Temp\wtEEE4.tmp\test file.sde")]', got '' shlexec.c:2485: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail="%1", ddeexec="[open(%1)]", app="shlexec", topic="dde" ddeExec expected '[open(C:\Users\winetest\AppData\Local\Temp\wtEEE4.tmp\test file.sde)]', got '' shlexec.c:2485: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail="", ddeexec="[open("%1")]", app="shlexec", topic="dde", ifexec="[ifexec("%1")]" ddeExec expected '[ifexec("C:\Users\winetest\AppData\Local\Temp\wtEEE4.tmp\test file.sde")]', got '' shlexec.c:2485: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail="", ddeexec="[open("%1")]", app="shlexec" ddeExec expected '[open("C:\Users\winetest\AppData\Local\Temp\wtEEE4.tmp\test file.sde")]', got '' shlexec.c:2485: Test failed: ShellExecuteEx(mask="0x8540", file="<tmpdir>\test file.sde") Assoc class="shlexec.sde", verb="Open", rawcmd="0", cmdtail="", ddeexec="[open("%1")]", topic="dde" ddeExec expected '[open("C:\Users\winetest\AppData\Local\Temp\wtEEE4.tmp\test file.sde")]', got ''
On Sun, 15 Mar 2020, Francois Gouget wrote:
Trace the temporary directory value on startup since it's no longer visible in the failure messages.
Ignore this patch. There are other places where the temporary directory goes through. I'm sending an updated patch.