[PATCH] vbscript/tests: Try calling GetObject again if it fails the first time.

Alex Henrie <[email protected]>
Newsgroups gmane.comp.emulators.wine.patches
Message-ID <[email protected]>
This will fix the failures at
http://test.winehq.org/data/aef2f0799f09595f3458d3495e85bba0c9059865/win8_newtb-w864-64/vbscript:createobj.html

I couldn't find any sane explanation for why the first call to GetObject
fails but a second with the same arguments succeeds. Only one Windows 8
testbot exhibits this behavior. My best guess is that it's a bug in
Windows 8 that was fixed in a later update.

Signed-off-by: Alex Henrie <[email protected]>
---
 dlls/vbscript/tests/createobj.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/dlls/vbscript/tests/createobj.c b/dlls/vbscript/tests/createobj.c
index 002f12ff8b..1c72ed25c4 100644
--- a/dlls/vbscript/tests/createobj.c
+++ b/dlls/vbscript/tests/createobj.c
@@ -50,6 +50,8 @@
 
 extern const CLSID CLSID_VBScript;
 
+#define VB_E_ACCESS_DENIED      0x800a0046
+
 #define DEFINE_EXPECT(func) \
     static BOOL expect_ ## func = FALSE, called_ ## func = FALSE
 
@@ -988,6 +990,8 @@ static void test_GetObject(void)
     SET_EXPECT(SetSite);
     SET_EXPECT(reportSuccess);
     hres = parse_script_ae(parser, "Call GetObject(\"clsid:" TESTOBJINST_CLSID "\").reportSuccess()");
+    if(broken(hres == VB_E_ACCESS_DENIED)) /* 64-bit win8 fails on the first try */
+        hres = parse_script_ae(parser, "Call GetObject(\"clsid:" TESTOBJINST_CLSID "\").reportSuccess()");
     if(hres == HRESULT_FROM_WIN32(ERROR_MOD_NOT_FOUND)) { /* Workaround for broken win2k */
         win_skip("got unexpected error %08x\n", hres);
         CLEAR_CALLED(QI_IObjectWithSite);
-- 
2.14.2
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.