create_lnk() reports all failures from the perspective of the caller. That means the failure messages must be unique so one can figure out which one of its ok() calls actually failed.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- Some of these tests sometimes fail (bug 28920 but it's not known which) so this may cause the failures to look new. --- dlls/shell32/tests/shelllink.c | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-)
diff --git a/dlls/shell32/tests/shelllink.c b/dlls/shell32/tests/shelllink.c index 8cbc46696ab..c8a0308a9cb 100644 --- a/dlls/shell32/tests/shelllink.c +++ b/dlls/shell32/tests/shelllink.c @@ -452,41 +452,45 @@ void create_lnk_(int line, const WCHAR* path, lnk_desc_t* desc)
init_dirty = IPersistFile_IsDirty(pf); /* empty links start off as clean */ r = IPersistFile_Save(pf, NULL, FALSE); - lok(r == S_OK || r == E_INVALIDARG /* before Windows 7 */, "save failed (0x%08lx)\n", r); + lok(r == S_OK || r == E_INVALIDARG /* before Windows 7 */, + "save(NULL, FALSE) failed (0x%08lx)\n", r); + r = IPersistFile_IsDirty(pf); - lok(r == init_dirty, "dirty (0x%08lx)\n", r); + lok(r == init_dirty, "dirty(NULL, FALSE) (0x%08lx)\n", r);
r = IPersistFile_Save(pf, NULL, TRUE); - lok(r == S_OK || r == E_INVALIDARG /* before Windows 7 */, "save failed (0x%08lx)\n", r); + lok(r == S_OK || r == E_INVALIDARG /* before Windows 7 */, + "save(NULL, TRUE) failed (0x%08lx)\n", r); + r = IPersistFile_IsDirty(pf); - lok(r == init_dirty, "dirty (0x%08lx)\n", r); + lok(r == init_dirty, "dirty(NULL, TRUE) (0x%08lx)\n", r);
/* test GetCurFile before ::Save */ str = (LPWSTR)0xdeadbeef; r = IPersistFile_GetCurFile(pf, &str); - lok(r == S_FALSE, "got 0x%08lx\n", r); - lok(str == NULL, "got %p\n", str); + lok(r == S_FALSE, "GetCurFile:before got 0x%08lx\n", r); + lok(str == NULL, "GetCurFile:before got %p\n", str);
r = IPersistFile_Save(pf, path, TRUE); - lok(r == S_OK, "save failed (0x%08lx)\n", r); + lok(r == S_OK, "save(path, TRUE) failed (0x%08lx)\n", r); r = IPersistFile_IsDirty(pf); - lok(r == S_FALSE, "dirty (0x%08lx)\n", r); + lok(r == S_FALSE, "dirty(path, TRUE) (0x%08lx)\n", r);
/* test GetCurFile after ::Save */ r = IPersistFile_GetCurFile(pf, &str); - lok(r == S_OK, "got 0x%08lx\n", r); - lok(str != NULL, "Didn't expect NULL\n"); - lok(!wcscmp(path, str), "Expected %s, got %s\n", wine_dbgstr_w(path), wine_dbgstr_w(str)); + lok(r == S_OK, "GetCurFile(path, TRUE) got 0x%08lx\n", r); + lok(str != NULL, "GetCurFile(path, TRUE) Didn't expect NULL\n"); + lok(!wcscmp(path, str), "GetCurFile(path, TRUE) Expected %s, got %s\n", wine_dbgstr_w(path), wine_dbgstr_w(str)); CoTaskMemFree(str);
r = IPersistFile_Save(pf, NULL, TRUE); - lok(r == S_OK, "save failed (0x%08lx)\n", r); + lok(r == S_OK, "save(NULL, TRUE) failed (0x%08lx)\n", r);
/* test GetCurFile after ::Save */ r = IPersistFile_GetCurFile(pf, &str); - lok(r == S_OK, "got 0x%08lx\n", r); - lok(str != NULL, "Didn't expect NULL\n"); - lok(!wcscmp(path, str), "Expected %s, got %s\n", wine_dbgstr_w(path), wine_dbgstr_w(str)); + lok(r == S_OK, "GetCurFile(NULL, TRUE) got 0x%08lx\n", r); + lok(str != NULL, "GetCurFile(NULL, TRUE) Didn't expect NULL\n"); + lok(!wcscmp(path, str), "GetCurFile(NULL, TRUE) Expected %s, got %s\n", wine_dbgstr_w(path), wine_dbgstr_w(str)); CoTaskMemFree(str);
IPersistFile_Release(pf);
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=114661
Your paranoid android.
=== debian11 (32 bit WoW report) ===
shell32: shelllink.c:755: Test failed: save(path, TRUE) failed (0x80070020) shelllink.c:755: Test failed: dirty(path, TRUE) (0x00000000) shelllink.c:755: Test failed: GetCurFile(path, TRUE) got 0x00000001 shelllink.c:755: Test failed: GetCurFile(path, TRUE) Didn't expect NULL Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x6a2e93ad).