Module: wine Branch: master Commit: 33b45cf98df116f927d25c76824fdb7d343fc9db URL: http://source.winehq.org/git/wine.git/?a=commit;h=33b45cf98df116f927d25c7682...
Author: Paul Vriens Paul.Vriens.Wine@gmail.com Date: Tue Mar 16 19:21:08 2010 +0100
shlwapi/tests: Fix some test failures on XP/Vista.
---
dlls/shlwapi/tests/istream.c | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/dlls/shlwapi/tests/istream.c b/dlls/shlwapi/tests/istream.c index 9501cd8..4a36b3a 100644 --- a/dlls/shlwapi/tests/istream.c +++ b/dlls/shlwapi/tests/istream.c @@ -432,6 +432,11 @@ static void test_SHCreateStreamOnFileEx(DWORD mode, DWORD stgm)
stream = NULL; ret = (*pSHCreateStreamOnFileEx)(test_file, mode, 0, FALSE, template, &stream); + if (ret == HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED)) { + win_skip("File probably locked by Anti-Virus/Spam software, trying again\n"); + Sleep(1000); + ret = (*pSHCreateStreamOnFileEx)(test_file, mode, 0, FALSE, template, &stream); + } ok( ret == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || ret == HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), "SHCreateStreamOnFileEx: expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) or " @@ -491,6 +496,11 @@ static void test_SHCreateStreamOnFileEx(DWORD mode, DWORD stgm)
stream = NULL; ret = (*pSHCreateStreamOnFileEx)(test_file, mode | STGM_CREATE | stgm, 0, FALSE, NULL, &stream); + if (ret == HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED)) { + win_skip("File probably locked by Anti-Virus/Spam software, trying again\n"); + Sleep(1000); + ret = (*pSHCreateStreamOnFileEx)(test_file, mode | STGM_CREATE | stgm, 0, FALSE, NULL, &stream); + } ok(ret == S_OK, "SHCreateStreamOnFileEx: expected S_OK, got 0x%08x\n", ret); ok(stream != NULL, "SHCreateStreamOnFileEx: expected a valid IStream object, got NULL\n");
@@ -507,6 +517,11 @@ static void test_SHCreateStreamOnFileEx(DWORD mode, DWORD stgm)
stream = NULL; ret = (*pSHCreateStreamOnFileEx)(test_file, mode | STGM_CREATE | stgm, 0, TRUE, NULL, &stream); + if (ret == HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED)) { + win_skip("File probably locked by Anti-Virus/Spam software, trying again\n"); + Sleep(1000); + ret = (*pSHCreateStreamOnFileEx)(test_file, mode | STGM_CREATE | stgm, 0, TRUE, NULL, &stream); + } ok(ret == S_OK, "SHCreateStreamOnFileEx: expected S_OK, got 0x%08x\n", ret); ok(stream != NULL, "SHCreateStreamOnFileEx: expected a valid IStream object, got NULL\n");