Hans Leidekker : msi/tests: Fix an intermittent test failure.
Alexandre Julliard
julliard at winehq.org
Mon May 16 15:37:56 CDT 2022
Module: wine
Branch: master
Commit: 7bf7340eb6e7135d45c7f233649cfe4989eaf3d2
URL: https://source.winehq.org/git/wine.git/?a=commit;h=7bf7340eb6e7135d45c7f233649cfe4989eaf3d2
Author: Hans Leidekker <hans at codeweavers.com>
Date: Sat May 14 12:16:46 2022 +0200
msi/tests: Fix an intermittent test failure.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52993
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/msi/tests/action.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/dlls/msi/tests/action.c b/dlls/msi/tests/action.c
index 224637eb286..e5c862e206c 100644
--- a/dlls/msi/tests/action.c
+++ b/dlls/msi/tests/action.c
@@ -3690,9 +3690,10 @@ static void test_publish(void)
LONG res;
HKEY uninstall, prodkey, uninstall_32node = NULL;
INSTALLSTATE state;
- char date[MAX_PATH], temp[MAX_PATH], prodcode[] = "{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}";
+ char date[MAX_PATH], date2[MAX_PATH], temp[MAX_PATH], buf[MAX_PATH];
+ const char prodcode[] = "{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}";
REGSAM access = KEY_ALL_ACCESS;
- DWORD error;
+ DWORD error, type, size;
if (!pMsiQueryFeatureStateExA)
{
@@ -4216,7 +4217,15 @@ static void test_publish(void)
CHECK_REG_STR(prodkey, "DisplayName", "MSITEST");
CHECK_REG_STR(prodkey, "DisplayVersion", "1.1.1");
- CHECK_REG_STR(prodkey, "InstallDate", date);
+
+ get_date_str(date2);
+ size = ARRAY_SIZE(buf);
+ buf[0] = '\0';
+ res = RegQueryValueExA(prodkey, "InstallDate", NULL, &type, (BYTE *)buf, &size);
+ ok(!res, "Failed to query value, error %ld\n", res);
+ ok(type == REG_SZ, "Got wrong type %lu\n", type);
+ ok(!strcmp(buf, date) || !strcmp(buf, date2), "got %s\n", debugstr_a(buf));
+
CHECK_REG_STR(prodkey, "InstallSource", temp);
CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
CHECK_REG_STR(prodkey, "Publisher", "Wine");
More information about the wine-cvs
mailing list