Hi,
The msi test currently fails for me on Wine when run the second time after getting a clean environment:
rm -rf ~/.wine make msi.ok msi: 101 tests executed (0 marked as todo, 0 failures), 0 skipped. rm msi.ok make msi.ok msi.c:366: Test failed: Expected INSTALLSTATE_UNKNOWN, got 1 msi: 101 tests executed (0 marked as todo, 1 failure), 0 skipped.
Anyone?
Cheers,
Paul.
On 7/27/07, Paul Vriens paul.vriens.wine@gmail.com wrote:
Hi,
The msi test currently fails for me on Wine when run the second time after getting a clean environment:
rm -rf ~/.wine make msi.ok msi: 101 tests executed (0 marked as todo, 0 failures), 0 skipped. rm msi.ok make msi.ok msi.c:366: Test failed: Expected INSTALLSTATE_UNKNOWN, got 1 msi: 101 tests executed (0 marked as todo, 1 failure), 0 skipped.
Anyone?
Works fine for me.
James Hawkins wrote:
On 7/27/07, Paul Vriens paul.vriens.wine@gmail.com wrote:
Hi,
The msi test currently fails for me on Wine when run the second time after getting a clean environment:
rm -rf ~/.wine make msi.ok msi: 101 tests executed (0 marked as todo, 0 failures), 0 skipped. rm msi.ok make msi.ok msi.c:366: Test failed: Expected INSTALLSTATE_UNKNOWN, got 1 msi: 101 tests executed (0 marked as todo, 1 failure), 0 skipped.
Anyone?
Works fine for me.
It's even stranger then that. Running 'make msi.ok' gives:
msi.c:366: Test failed: Expected INSTALLSTATE_UNKNOWN, got 1 msi: 101 tests executed (0 marked as todo, 1 failure), 0 skipped.
running 'WINEDEBUG=+msi make msi.ok' gives:
<A LOT OF DEBUG STUFF> msi: 101 tests executed (0 marked as todo, 0 failures), 0 skipped.
Can anybody (apart from James) do these tests?
What are the things that could influence these difference between my tests failing and James's tests succeeding? Compiler, 32-bit vs 64-bit ???
Cheers,
Paul.
James Hawkins wrote:
On 7/27/07, Paul Vriens paul.vriens.wine@gmail.com wrote:
Hi,
The msi test currently fails for me on Wine when run the second time after getting a clean environment:
rm -rf ~/.wine make msi.ok msi: 101 tests executed (0 marked as todo, 0 failures), 0 skipped. rm msi.ok make msi.ok msi.c:366: Test failed: Expected INSTALLSTATE_UNKNOWN, got 1 msi: 101 tests executed (0 marked as todo, 1 failure), 0 skipped.
Anyone?
Works fine for me.
Hi James,
Would the attached patch be OK? It makes sure that squash_guid always sets the out parameter and check the results of squash_guid in the callers (from registry.c).
This fixes the msi test for me.
I'm not sure about the returned error code ERROR_FILE_NOT_FOUND but it made the most sense to me.
Cheers,
Paul.
diff --git a/dlls/msi/registry.c b/dlls/msi/registry.c index b9c0af4..bda4e28 100644 --- a/dlls/msi/registry.c +++ b/dlls/msi/registry.c @@ -233,6 +233,8 @@ BOOL squash_guid(LPCWSTR in, LPWSTR out) DWORD i,n=1; GUID guid;
+ out[0] = 0; + if (FAILED(CLSIDFromString((LPOLESTR)in, &guid))) return FALSE;
@@ -474,7 +476,8 @@ UINT MSIREG_OpenUserProductsKey(LPCWSTR szProduct, HKEY* key, BOOL create) WCHAR keypath[0x200];
TRACE("%s\n",debugstr_w(szProduct)); - squash_guid(szProduct,squished_pc); + if (!squash_guid(szProduct,squished_pc)) + return ERROR_FILE_NOT_FOUND; TRACE("squished (%s)\n", debugstr_w(squished_pc));
sprintfW(keypath,szUserProduct_fmt,squished_pc); @@ -493,7 +496,8 @@ UINT MSIREG_DeleteUserProductKey(LPCWSTR szProduct) WCHAR keypath[0x200];
TRACE("%s\n",debugstr_w(szProduct)); - squash_guid(szProduct,squished_pc); + if (!squash_guid(szProduct,squished_pc)) + return ERROR_FILE_NOT_FOUND; TRACE("squished (%s)\n", debugstr_w(squished_pc));
sprintfW(keypath,szUserProduct_fmt,squished_pc); @@ -508,7 +512,8 @@ UINT MSIREG_OpenUserPatchesKey(LPCWSTR szPatch, HKEY* key, BOOL create) WCHAR keypath[0x200];
TRACE("%s\n",debugstr_w(szPatch)); - squash_guid(szPatch,squished_pc); + if (!squash_guid(szPatch,squished_pc)) + return ERROR_FILE_NOT_FOUND; TRACE("squished (%s)\n", debugstr_w(squished_pc));
sprintfW(keypath,szUserPatch_fmt,squished_pc); @@ -528,7 +533,8 @@ UINT MSIREG_OpenUserFeaturesKey(LPCWSTR szProduct, HKEY* key, BOOL create) WCHAR keypath[0x200];
TRACE("%s\n",debugstr_w(szProduct)); - squash_guid(szProduct,squished_pc); + if (!squash_guid(szProduct,squished_pc)) + return ERROR_FILE_NOT_FOUND; TRACE("squished (%s)\n", debugstr_w(squished_pc));
sprintfW(keypath,szUserFeatures_fmt,squished_pc); @@ -553,7 +559,8 @@ UINT MSIREG_OpenFeaturesKey(LPCWSTR szProduct, HKEY* key, BOOL create) WCHAR keypath[0x200];
TRACE("%s\n",debugstr_w(szProduct)); - squash_guid(szProduct,squished_pc); + if (!squash_guid(szProduct,squished_pc)) + return ERROR_FILE_NOT_FOUND; TRACE("squished (%s)\n", debugstr_w(squished_pc));
sprintfW(keypath,szInstaller_Features_fmt,squished_pc); @@ -574,7 +581,8 @@ UINT MSIREG_OpenUserDataFeaturesKey(LPCWSTR szProduct, HKEY *key, BOOL create) LPWSTR usersid;
TRACE("%s\n", debugstr_w(szProduct)); - squash_guid(szProduct, squished_pc); + if (!squash_guid(szProduct, squished_pc)) + return ERROR_FILE_NOT_FOUND; TRACE("squished (%s)\n", debugstr_w(squished_pc));
rc = get_user_sid(&usersid); @@ -607,7 +615,8 @@ UINT MSIREG_OpenComponentsKey(LPCWSTR szComponent, HKEY* key, BOOL create) WCHAR keypath[0x200];
TRACE("%s\n",debugstr_w(szComponent)); - squash_guid(szComponent,squished_cc); + if (!squash_guid(szComponent,squished_cc)) + return ERROR_FILE_NOT_FOUND; TRACE("squished (%s)\n", debugstr_w(squished_cc));
sprintfW(keypath,szInstaller_Components_fmt,squished_cc); @@ -627,7 +636,8 @@ UINT MSIREG_OpenUserComponentsKey(LPCWSTR szComponent, HKEY* key, BOOL create) WCHAR keypath[0x200];
TRACE("%s\n",debugstr_w(szComponent)); - squash_guid(szComponent,squished_cc); + if (!squash_guid(szComponent,squished_cc)) + return ERROR_FILE_NOT_FOUND; TRACE("squished (%s)\n", debugstr_w(squished_cc));
sprintfW(keypath,szUser_Components_fmt,squished_cc); @@ -648,7 +658,8 @@ UINT MSIREG_OpenUserDataComponentKey(LPCWSTR szComponent, HKEY *key, BOOL create LPWSTR usersid;
TRACE("%s\n", debugstr_w(szComponent)); - squash_guid(szComponent, comp); + if (!squash_guid(szComponent, comp)) + return ERROR_FILE_NOT_FOUND; TRACE("squished (%s)\n", debugstr_w(comp));
rc = get_user_sid(&usersid); @@ -677,7 +688,8 @@ UINT MSIREG_OpenUserDataProductKey(LPCWSTR szProduct, HKEY *key, BOOL create) LPWSTR usersid;
TRACE("%s\n", debugstr_w(szProduct)); - squash_guid(szProduct, squished_pc); + if (!squash_guid(szProduct, squished_pc)) + return ERROR_FILE_NOT_FOUND; TRACE("squished (%s)\n", debugstr_w(squished_pc));
rc = get_user_sid(&usersid); @@ -706,7 +718,8 @@ UINT MSIREG_OpenInstallPropertiesKey(LPCWSTR szProduct, HKEY *key, BOOL create) LPWSTR usersid;
TRACE("%s\n", debugstr_w(szProduct)); - squash_guid(szProduct, squished_pc); + if (!squash_guid(szProduct, squished_pc)) + return ERROR_FILE_NOT_FOUND; TRACE("squished (%s)\n", debugstr_w(squished_pc));
rc = get_user_sid(&usersid); @@ -735,7 +748,8 @@ UINT MSIREG_DeleteUserDataProductKey(LPCWSTR szProduct) LPWSTR usersid;
TRACE("%s\n", debugstr_w(szProduct)); - squash_guid(szProduct, squished_pc); + if (!squash_guid(szProduct, squished_pc)) + return ERROR_FILE_NOT_FOUND; TRACE("squished (%s)\n", debugstr_w(squished_pc));
rc = get_user_sid(&usersid); @@ -763,7 +777,8 @@ UINT MSIREG_OpenProductsKey(LPCWSTR szProduct, HKEY* key, BOOL create) WCHAR keypath[0x200];
TRACE("%s\n",debugstr_w(szProduct)); - squash_guid(szProduct,squished_pc); + if (!squash_guid(szProduct,squished_pc)) + return ERROR_FILE_NOT_FOUND; TRACE("squished (%s)\n", debugstr_w(squished_pc));
sprintfW(keypath,szInstaller_Products_fmt,squished_pc); @@ -782,7 +797,8 @@ UINT MSIREG_DeleteProductKey(LPCWSTR szProduct) WCHAR keypath[0x200];
TRACE("%s\n", debugstr_w(szProduct)); - squash_guid(szProduct, squished_pc); + if (!squash_guid(szProduct, squished_pc)) + return ERROR_FILE_NOT_FOUND; TRACE("squished (%s)\n", debugstr_w(squished_pc));
sprintfW(keypath, szInstaller_Products_fmt, squished_pc); @@ -797,7 +813,8 @@ UINT MSIREG_OpenPatchesKey(LPCWSTR szPatch, HKEY* key, BOOL create) WCHAR keypath[0x200];
TRACE("%s\n",debugstr_w(szPatch)); - squash_guid(szPatch,squished_pc); + if (!squash_guid(szPatch,squished_pc)) + return ERROR_FILE_NOT_FOUND; TRACE("squished (%s)\n", debugstr_w(squished_pc));
sprintfW(keypath,szInstaller_Patches_fmt,squished_pc); @@ -817,7 +834,8 @@ UINT MSIREG_OpenUpgradeCodesKey(LPCWSTR szUpgradeCode, HKEY* key, BOOL create) WCHAR keypath[0x200];
TRACE("%s\n",debugstr_w(szUpgradeCode)); - squash_guid(szUpgradeCode,squished_pc); + if (!squash_guid(szUpgradeCode,squished_pc)) + return ERROR_FILE_NOT_FOUND; TRACE("squished (%s)\n", debugstr_w(squished_pc));
sprintfW(keypath,szInstaller_UpgradeCodes_fmt,squished_pc); @@ -837,7 +855,8 @@ UINT MSIREG_OpenUserUpgradeCodesKey(LPCWSTR szUpgradeCode, HKEY* key, BOOL creat WCHAR keypath[0x200];
TRACE("%s\n",debugstr_w(szUpgradeCode)); - squash_guid(szUpgradeCode,squished_pc); + if (!squash_guid(szUpgradeCode,squished_pc)) + return ERROR_FILE_NOT_FOUND; TRACE("squished (%s)\n", debugstr_w(squished_pc));
sprintfW(keypath,szInstaller_UserUpgradeCodes_fmt,squished_pc);
On 7/30/07, Paul Vriens paul.vriens.wine@gmail.com wrote:
James Hawkins wrote:
On 7/27/07, Paul Vriens paul.vriens.wine@gmail.com wrote:
Hi,
The msi test currently fails for me on Wine when run the second time after getting a clean environment:
rm -rf ~/.wine make msi.ok msi: 101 tests executed (0 marked as todo, 0 failures), 0 skipped. rm msi.ok make msi.ok msi.c:366: Test failed: Expected INSTALLSTATE_UNKNOWN, got 1 msi: 101 tests executed (0 marked as todo, 1 failure), 0 skipped.
Anyone?
Works fine for me.
Hi James,
Would the attached patch be OK? It makes sure that squash_guid always sets the out parameter and check the results of squash_guid in the callers (from registry.c).
This fixes the msi test for me.
I'm not sure about the returned error code ERROR_FILE_NOT_FOUND but it made the most sense to me.
hmm it should probably be ERROR_FUNCTION_FAILED, but otherwise it's fine.
James Hawkins wrote:
On 7/30/07, Paul Vriens paul.vriens.wine@gmail.com wrote:
James Hawkins wrote:
On 7/27/07, Paul Vriens paul.vriens.wine@gmail.com wrote:
Hi,
The msi test currently fails for me on Wine when run the second time after getting a clean environment:
rm -rf ~/.wine make msi.ok msi: 101 tests executed (0 marked as todo, 0 failures), 0 skipped. rm msi.ok make msi.ok msi.c:366: Test failed: Expected INSTALLSTATE_UNKNOWN, got 1 msi: 101 tests executed (0 marked as todo, 1 failure), 0 skipped.
Anyone?
Works fine for me.
Hi James,
Would the attached patch be OK? It makes sure that squash_guid always sets the out parameter and check the results of squash_guid in the callers (from registry.c).
This fixes the msi test for me.
I'm not sure about the returned error code ERROR_FILE_NOT_FOUND but it made the most sense to me.
hmm it should probably be ERROR_FUNCTION_FAILED, but otherwise it's fine.
Sound reasonable. I'll change that. I'll also have a look at the other callers of squash_guid.
It's still strange though that it doesn't happen on your box (you are the only one that came back, and of course Alexandre cause I guess he runs the tests every time before he commits something).
Cheers,
Paul.
It's still strange though that it doesn't happen on your box (you are the only one that came back, and of course Alexandre cause I guess he runs the tests every time before he commits something).
It also succeeds when running twice here. (make install.ok hangs here, though.) --Juan
Juan Lang wrote:
It's still strange though that it doesn't happen on your box (you are the only one that came back, and of course Alexandre cause I guess he runs the tests every time before he commits something).
It also succeeds when running twice here. (make install.ok hangs here, though.) --Juan
After a 'rm ~/.wine' ?
Could this be a compiler/platform issue (difference). If you run 'WINEDEBUG=+msi make msi.ok' do you see garbage in the 'squished ...' output?
Apart from the fact it only fails for me (for now), I guess the patch I've just sent makes sense anyhow.
Cheers.
Paul.
On 7/30/07, Paul Vriens paul.vriens.wine@gmail.com wrote:
Juan Lang wrote:
It's still strange though that it doesn't happen on your box (you are the only one that came back, and of course Alexandre cause I guess he runs the tests every time before he commits something).
It also succeeds when running twice here. (make install.ok hangs here, though.) --Juan
After a 'rm ~/.wine' ?
Could this be a compiler/platform issue (difference). If you run 'WINEDEBUG=+msi make msi.ok' do you see garbage in the 'squished ...' output?
Apart from the fact it only fails for me (for now), I guess the patch I've just sent makes sense anyhow.
The garbage in the squished guid is not important...the regopen call will fail like it's supposed to because the squished guid doesn't match.
James Hawkins wrote:
On 7/30/07, Paul Vriens paul.vriens.wine@gmail.com wrote:
Juan Lang wrote:
It's still strange though that it doesn't happen on your box (you are the only one that came back, and of course Alexandre cause I guess he runs the tests every time before he commits something).
It also succeeds when running twice here. (make install.ok hangs here, though.) --Juan
After a 'rm ~/.wine' ?
Could this be a compiler/platform issue (difference). If you run 'WINEDEBUG=+msi make msi.ok' do you see garbage in the 'squished ...' output?
Apart from the fact it only fails for me (for now), I guess the patch I've just sent makes sense anyhow.
The garbage in the squished guid is not important...the regopen call will fail like it's supposed to because the squished guid doesn't match.
Yeah I guess so, but I didn't have garbage all the time (remember I wrote that it succeeded when running with WINEDEBUG=+msi). So if it was just returned as an empty string (or at least interpreted as such) a RegOpenKey would succeed on the parent of the GUID (Software\Microsoft\Installer\Products) which is most of the time there.
Cheers,
Paul.