Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/msi/tests/action.c | 26 +++++++++++++++++++++++++- dlls/msi/tests/custom.c | 16 ++++++++++++++++ dlls/msi/tests/custom.spec | 2 ++ 3 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/dlls/msi/tests/action.c b/dlls/msi/tests/action.c index 943c939..1600fe3 100644 --- a/dlls/msi/tests/action.c +++ b/dlls/msi/tests/action.c @@ -526,6 +526,29 @@ static const char mov_move_file_dat[] = "wildcardnodest\taugustus\tbudd*\t\tSourceDir\tMSITESTDIR\t1\n" "singlenodest\taugustus\tb?r\t\tSourceDir\tMSITESTDIR\t1\n";
+static const char mov_install_exec_seq_dat[] = + "Action\tCondition\tSequence\n" + "s72\tS255\tI2\n" + "InstallExecuteSequence\tAction\n" + "CostInitialize\t\t100\n" + "FileCost\t\t200\n" + "ResolveSource\t\t300\n" + "CostFinalize\t\t400\n" + "InstallValidate\t\t500\n" + "InstallInitialize\t\t600\n" + "MoveFiles\t\t700\n" + "mov_immediate\t\t701\n" + "mov_deferred\t\t702\n" + "InstallFiles\t\t800\n" + "InstallFinalize\t\t900\n"; + +static const char mov_custom_action_dat[] = + "Action\tType\tSource\tTarget\n" + "s72\ti2\tS64\tS0\n" + "CustomAction\tAction\n" + "mov_immediate\t1\tcustom.dll\tmov_absent\n" + "mov_deferred\t1025\tcustom.dll\tmov_present\n"; + static const char df_directory_dat[] = "Directory\tDirectory_Parent\tDefaultDir\n" "s72\tS72\tl255\n" @@ -1843,7 +1866,8 @@ static const msi_table mov_tables[] = ADD_TABLE(rof_feature), ADD_TABLE(ci2_feature_comp), ADD_TABLE(ci2_file), - ADD_TABLE(install_exec_seq), + ADD_TABLE(mov_install_exec_seq), + ADD_TABLE(mov_custom_action), ADD_TABLE(rof_media), ADD_TABLE(property), ADD_TABLE(mov_move_file), diff --git a/dlls/msi/tests/custom.c b/dlls/msi/tests/custom.c index 0f34eb0..0bf62d9 100644 --- a/dlls/msi/tests/custom.c +++ b/dlls/msi/tests/custom.c @@ -1363,3 +1363,19 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) { } return ERROR_SUCCESS; } + +UINT WINAPI mov_present(MSIHANDLE hinst) +{ + ok(hinst, pf_exists("msitest\canada"), "file absent\n"); + ok(hinst, pf_exists("msitest\dominica"), "file absent\n"); + return ERROR_SUCCESS; +} + +UINT WINAPI mov_absent(MSIHANDLE hinst) +{ +todo_wine { + ok(hinst, !pf_exists("msitest\canada"), "file present\n"); + ok(hinst, !pf_exists("msitest\dominica"), "file present\n"); +} + return ERROR_SUCCESS; +} diff --git a/dlls/msi/tests/custom.spec b/dlls/msi/tests/custom.spec index 52feffa..4b46dc3 100644 --- a/dlls/msi/tests/custom.spec +++ b/dlls/msi/tests/custom.spec @@ -9,6 +9,8 @@ @ stdcall crs_absent(long) @ stdcall file_present(long) @ stdcall file_absent(long) +@ stdcall mov_present(long) +@ stdcall mov_absent(long) @ stdcall odbc_present(long) @ stdcall odbc_absent(long) @ stdcall rd_present(long)
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/msi/tests/action.c | 14 ++++++++++++ dlls/msi/tests/custom.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++ dlls/msi/tests/custom.spec | 2 ++ 3 files changed, 69 insertions(+)
diff --git a/dlls/msi/tests/action.c b/dlls/msi/tests/action.c index 1600fe3..bd1e2c0 100644 --- a/dlls/msi/tests/action.c +++ b/dlls/msi/tests/action.c @@ -1733,12 +1733,25 @@ static const char pa_install_exec_seq_dat[] = "InstallInitialize\t\t1500\n" "ProcessComponents\t\t1600\n" "MsiPublishAssemblies\t\t3000\n" + "pa_immediate\tNOT REMOVE AND NOT ALLUSERS\t3001\n" + "pa_deferred\tNOT REMOVE AND NOT ALLUSERS\t3002\n" "MsiUnpublishAssemblies\t\t4000\n" + "ua_immediate\tREMOVE AND NOT ALLUSERS\t4001\n" + "ua_deferred\tREMOVE AND NOT ALLUSERS\t4002\n" "RegisterProduct\t\t5000\n" "PublishFeatures\t\t5100\n" "PublishProduct\t\t5200\n" "InstallFinalize\t\t6000\n";
+static const char pa_custom_action_dat[] = + "Action\tType\tSource\tTarget\n" + "s72\ti2\tS64\tS0\n" + "CustomAction\tAction\n" + "pa_immediate\t1\tcustom.dll\tpa_absent\n" + "pa_deferred\t1025\tcustom.dll\tpa_present\n" + "ua_immediate\t1\tcustom.dll\tpa_present\n" + "ua_deferred\t1025\tcustom.dll\tpa_absent\n"; + static const char rep_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" @@ -2191,6 +2204,7 @@ static const msi_table pa_tables[] = ADD_TABLE(pa_msi_assembly), ADD_TABLE(pa_msi_assembly_name), ADD_TABLE(pa_install_exec_seq), + ADD_TABLE(pa_custom_action), ADD_TABLE(media), ADD_TABLE(property) }; diff --git a/dlls/msi/tests/custom.c b/dlls/msi/tests/custom.c index 0bf62d9..c37309e 100644 --- a/dlls/msi/tests/custom.c +++ b/dlls/msi/tests/custom.c @@ -1379,3 +1379,56 @@ todo_wine { } return ERROR_SUCCESS; } + +static void check_reg_str(MSIHANDLE hinst, HKEY key, const char *name, const char *expect) +{ + char value[300]; + DWORD sz; + LONG res; + + sz = sizeof(value); + res = RegQueryValueExA(key, name, NULL, NULL, (BYTE *)value, &sz); + if (expect) + { + ok(hinst, !res, "failed to get value "%s": %d\n", name, res); + ok(hinst, !strcmp(value, expect), ""%s": expected "%s", got "%s"\n", + name, expect, value); + } + else + ok(hinst, res == ERROR_FILE_NOT_FOUND, ""%s": expected missing, got %u\n", + name, res); +} + +static const char path_dotnet[] = "Software\Microsoft\Installer\Assemblies\Global"; +static const char name_dotnet[] = "Wine.Dotnet.Assembly,processorArchitecture="MSIL"," + "publicKeyToken="abcdef0123456789",version="1.0.0.0",culture="neutral""; + +UINT WINAPI pa_present(MSIHANDLE hinst) +{ + HKEY key; + LONG res; + + res = RegOpenKeyA(HKEY_CURRENT_USER, path_dotnet, &key); + ok(hinst, !res, "got %d\n", res); +todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) + check_reg_str(hinst, key, name_dotnet, "rcHQPHq?CA@Uv-XqMI1e>Z'q,T*76M@=YEg6My?~]"); + RegCloseKey(key); + + return ERROR_SUCCESS; +} + +UINT WINAPI pa_absent(MSIHANDLE hinst) +{ + HKEY key; + LONG res; + + res = RegOpenKeyA(HKEY_CURRENT_USER, path_dotnet, &key); + ok(hinst, !res || res == ERROR_FILE_NOT_FOUND, "got %d\n", res); + if (!res) + { +todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) + check_reg_str(hinst, key, name_dotnet, NULL); + RegCloseKey(key); + } + return ERROR_SUCCESS; +} diff --git a/dlls/msi/tests/custom.spec b/dlls/msi/tests/custom.spec index 4b46dc3..e5caa76 100644 --- a/dlls/msi/tests/custom.spec +++ b/dlls/msi/tests/custom.spec @@ -13,6 +13,8 @@ @ stdcall mov_absent(long) @ stdcall odbc_present(long) @ stdcall odbc_absent(long) +@ stdcall pa_present(long) +@ stdcall pa_absent(long) @ stdcall rd_present(long) @ stdcall rd_absent(long) @ stdcall sds_present(long)
Hi,
While running your changed tests on Windows, 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=38609
Your paranoid android.
=== w7pro64 (32 bit custom) === The previous 1 run(s) terminated abnormally
=== w7pro64 (64 bit custom) === The previous 1 run(s) terminated abnormally
On Tue, 2018-05-22 at 18:39 -0500, Zebediah Figura wrote:
Signed-off-by: Zebediah Figura z.figura12@gmail.com
dlls/msi/tests/action.c | 14 ++++++++++++ dlls/msi/tests/custom.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++ dlls/msi/tests/custom.spec | 2 ++ 3 files changed, 69 insertions(+)
This produces warnings here (gcc 6.3.0):
custom.c: In function ‘pa_present’: custom.c:75:31: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] #define todo_wine_if(is_todo) for (winetest_start_todo(is_todo); \ ^ custom.c:75:31: note: in definition of macro ‘todo_wine_if’ #define todo_wine_if(is_todo) for (winetest_start_todo(is_todo); \ ^~~ custom.c:1415:5: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘for’ RegCloseKey(key); ^~~~~~~~~~~ custom.c: In function ‘pa_absent’: custom.c:75:31: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] #define todo_wine_if(is_todo) for (winetest_start_todo(is_todo); \ ^ custom.c:75:31: note: in definition of macro ‘todo_wine_if’ #define todo_wine_if(is_todo) for (winetest_start_todo(is_todo); \ ^~~ custom.c:1431:9: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘for’ RegCloseKey(key); ^~~~~~~~~~~
Adding braces as in the other functions gets rid of the warnings.
On 23/05/18 03:30, Hans Leidekker wrote:
On Tue, 2018-05-22 at 18:39 -0500, Zebediah Figura wrote:
Signed-off-by: Zebediah Figura z.figura12@gmail.com
dlls/msi/tests/action.c | 14 ++++++++++++ dlls/msi/tests/custom.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++ dlls/msi/tests/custom.spec | 2 ++ 3 files changed, 69 insertions(+)
This produces warnings here (gcc 6.3.0):
custom.c: In function ‘pa_present’: custom.c:75:31: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] #define todo_wine_if(is_todo) for (winetest_start_todo(is_todo); \ ^ custom.c:75:31: note: in definition of macro ‘todo_wine_if’ #define todo_wine_if(is_todo) for (winetest_start_todo(is_todo); \ ^~~ custom.c:1415:5: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘for’ RegCloseKey(key); ^~~~~~~~~~~ custom.c: In function ‘pa_absent’: custom.c:75:31: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] #define todo_wine_if(is_todo) for (winetest_start_todo(is_todo); \ ^ custom.c:75:31: note: in definition of macro ‘todo_wine_if’ #define todo_wine_if(is_todo) for (winetest_start_todo(is_todo); \ ^~~ custom.c:1431:9: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘for’ RegCloseKey(key); ^~~~~~~~~~~
Adding braces as in the other functions gets rid of the warnings.
I guess I could add braces, but I'm not sure why it shouldn't work as-is. I just copied those macros from wine/test.h, and I don't understand why they would work normally but not here. Could someone please enlighten me?
On Wed, 2018-05-23 at 17:38 -0500, Zebediah Figura wrote:
On 23/05/18 03:30, Hans Leidekker wrote:
On Tue, 2018-05-22 at 18:39 -0500, Zebediah Figura wrote:
Signed-off-by: Zebediah Figura z.figura12@gmail.com
dlls/msi/tests/action.c | 14 ++++++++++++ dlls/msi/tests/custom.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++ dlls/msi/tests/custom.spec | 2 ++ 3 files changed, 69 insertions(+)
This produces warnings here (gcc 6.3.0):
custom.c: In function ‘pa_present’: custom.c:75:31: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] #define todo_wine_if(is_todo) for (winetest_start_todo(is_todo); \ ^ custom.c:75:31: note: in definition of macro ‘todo_wine_if’ #define todo_wine_if(is_todo) for (winetest_start_todo(is_todo); \ ^~~ custom.c:1415:5: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘for’ RegCloseKey(key); ^~~~~~~~~~~ custom.c: In function ‘pa_absent’: custom.c:75:31: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] #define todo_wine_if(is_todo) for (winetest_start_todo(is_todo); \ ^ custom.c:75:31: note: in definition of macro ‘todo_wine_if’ #define todo_wine_if(is_todo) for (winetest_start_todo(is_todo); \ ^~~ custom.c:1431:9: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘for’ RegCloseKey(key); ^~~~~~~~~~~
Adding braces as in the other functions gets rid of the warnings.
I guess I could add braces, but I'm not sure why it shouldn't work as-is. I just copied those macros from wine/test.h, and I don't understand why they would work normally but not here. Could someone please enlighten me?
This is what it looks like after preprocessing:
UINT __attribute__((__stdcall__)) __attribute__((__force_align_arg_pointer__)) pa_present(MSIHANDLE hinst) { ... for (winetest_start_todo(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)); winetest_loop_todo(); winetest_end_todo()) check_reg_str(hinst, key, name_dotnet, "rcHQPHq?CA@Uv-XqMI1e>Z'q,T*76M@=YEg6My?~]"); RegCloseKey(key);
This indentation (supposedly) suggests that the RegCloseKey(key) call should be inside the 'for' body.
If I add braces:
UINT __attribute__((__stdcall__)) __attribute__((__force_align_arg_pointer__)) pa_present(MSIHANDLE hinst) { ... for (winetest_start_todo(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)); winetest_loop_todo(); winetest_end_todo()) { check_reg_str(hinst, key, name_dotnet, "rcHQPHq?CA@Uv-XqMI1e>Z'q,T*76M@=YEg6My?~]"); } RegCloseKey(key);
or if I indent like this:
UINT __attribute__((__stdcall__)) __attribute__((__force_align_arg_pointer__)) pa_present(MSIHANDLE hinst) { ... for (winetest_start_todo(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)); winetest_loop_todo(); winetest_end_todo()) check_reg_str(hinst, key, name_dotnet, "rcHQPHq?CA@Uv-XqMI1e>Z'q,T*76M@=YEg6My?~]"); RegCloseKey(key);}
the warning goes away. Does that answer your question?
On 24/05/18 03:10, Hans Leidekker wrote:
If I add braces:
UINT __attribute__((__stdcall__)) __attribute__((__force_align_arg_pointer__)) pa_present(MSIHANDLE hinst) { ... for (winetest_start_todo(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)); winetest_loop_todo(); winetest_end_todo()) { check_reg_str(hinst, key, name_dotnet, "rcHQPHq?CA@Uv-XqMI1e>Z'q,T*76M@=YEg6My?~]"); } RegCloseKey(key);
or if I indent like this:
UINT __attribute__((__stdcall__)) __attribute__((__force_align_arg_pointer__)) pa_present(MSIHANDLE hinst) { ... for (winetest_start_todo(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)); winetest_loop_todo(); winetest_end_todo()) check_reg_str(hinst, key, name_dotnet, "rcHQPHq?CA@Uv-XqMI1e>Z'q,T*76M@=YEg6My?~]"); RegCloseKey(key);}
the warning goes away. Does that answer your question?
Sure, I understand that part, but I don't understand why no similar warning appears with the todo_wine macro from wine/test.h.
On Thu, 2018-05-24 at 08:14 -0500, Zebediah Figura wrote:
or if I indent like this:
UINT __attribute__((__stdcall__)) __attribute__((__force_align_arg_pointer__)) pa_present(MSIHANDLE hinst) { ... for (winetest_start_todo(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)); winetest_loop_todo(); winetest_end_todo()) check_reg_str(hinst, key, name_dotnet, "rcHQPHq?CA@Uv-XqMI1e>Z'q,T*76M@=YEg6My?~]"); RegCloseKey(key);}
the warning goes away. Does that answer your question?
Sure, I understand that part, but I don't understand why no similar warning appears with the todo_wine macro from wine/test.h.
It gives the same warning here, except when the following statement is ok() from wine/test.h...
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/msi/tests/action.c | 10 ++++++++++ dlls/msi/tests/custom.c | 32 ++++++++++++++++++++++++++++++++ dlls/msi/tests/custom.spec | 2 ++ 3 files changed, 44 insertions(+)
diff --git a/dlls/msi/tests/action.c b/dlls/msi/tests/action.c index bd1e2c0..17bbddc 100644 --- a/dlls/msi/tests/action.c +++ b/dlls/msi/tests/action.c @@ -396,6 +396,8 @@ static const char pp_install_exec_seq_dat[] = "InstallValidate\t\t1400\n" "InstallInitialize\t\t1500\n" "ProcessComponents\tPROCESS_COMPONENTS=1 Or FULL=1\t1600\n" + "ppc_immediate\tPROCESS_COMPONENTS AND ALLUSERS\t1601\n" + "ppc_deferred\tPROCESS_COMPONENTS AND ALLUSERS\t1602\n" "UnpublishFeatures\tUNPUBLISH_FEATURES=1 Or FULL=1\t1800\n" "RemoveFiles\t\t3500\n" "InstallFiles\t\t4000\n" @@ -405,6 +407,13 @@ static const char pp_install_exec_seq_dat[] = "PublishProduct\tPUBLISH_PRODUCT=1 Or FULL=1\t6400\n" "InstallFinalize\t\t6600";
+static const char pp_custom_action_dat[] = + "Action\tType\tSource\tTarget\n" + "s72\ti2\tS64\tS0\n" + "CustomAction\tAction\n" + "ppc_immediate\t1\tcustom.dll\tppc_absent\n" + "ppc_deferred\t1025\tcustom.dll\tppc_present\n"; + static const char pp_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" "s72\tS38\ts72\ti2\tS255\tS72\n" @@ -1855,6 +1864,7 @@ static const msi_table ppc_tables[] = ADD_TABLE(ppc_feature_comp), ADD_TABLE(ppc_file), ADD_TABLE(pp_install_exec_seq), + ADD_TABLE(pp_custom_action), ADD_TABLE(ppc_media), ADD_TABLE(property), }; diff --git a/dlls/msi/tests/custom.c b/dlls/msi/tests/custom.c index c37309e..0271384 100644 --- a/dlls/msi/tests/custom.c +++ b/dlls/msi/tests/custom.c @@ -1432,3 +1432,35 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) } return ERROR_SUCCESS; } + +static const char ppc_key[] = "Software\Microsoft\Windows\CurrentVersion\" + "Installer\UserData\S-1-5-18\Components\CBABC2FDCCB35E749A8944D8C1C098B5"; + +UINT WINAPI ppc_present(MSIHANDLE hinst) +{ + char expect[MAX_PATH]; + HKEY key; + UINT r; + + r = RegOpenKeyExA(HKEY_LOCAL_MACHINE, ppc_key, 0, KEY_QUERY_VALUE | KEY_WOW64_64KEY, &key); + ok(hinst, !r, "got %u\n", r); + + if (FAILED(SHGetFolderPathA(NULL, CSIDL_PROGRAM_FILESX86, NULL, 0, expect))) + SHGetFolderPathA(NULL, CSIDL_PROGRAM_FILES, NULL, 0, expect); + strcat(expect, "\msitest\maximus"); + check_reg_str(hinst, key, "84A88FD7F6998CE40A22FB59F6B9C2BB", expect); + + RegCloseKey(key); + return ERROR_SUCCESS; +} + +UINT WINAPI ppc_absent(MSIHANDLE hinst) +{ + HKEY key; + UINT r; + + r = RegOpenKeyExA(HKEY_LOCAL_MACHINE, ppc_key, 0, KEY_QUERY_VALUE | KEY_WOW64_64KEY, &key); +todo_wine + ok(hinst, r == ERROR_FILE_NOT_FOUND, "got %u\n", r); + return ERROR_SUCCESS; +} diff --git a/dlls/msi/tests/custom.spec b/dlls/msi/tests/custom.spec index e5caa76..3b73765 100644 --- a/dlls/msi/tests/custom.spec +++ b/dlls/msi/tests/custom.spec @@ -15,6 +15,8 @@ @ stdcall odbc_absent(long) @ stdcall pa_present(long) @ stdcall pa_absent(long) +@ stdcall ppc_present(long) +@ stdcall ppc_absent(long) @ stdcall rd_present(long) @ stdcall rd_absent(long) @ stdcall sds_present(long)
Hi,
While running your changed tests on Windows, 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=38610
Your paranoid android.
=== w7pro64 (32 bit custom) === The previous 1 run(s) terminated abnormally
Signed-off-by: Hans Leidekker hans@codeweavers.com
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/msi/tests/action.c | 14 ++++++++++++++ dlls/msi/tests/custom.c | 28 ++++++++++++++++++++++++++++ dlls/msi/tests/custom.spec | 2 ++ 3 files changed, 44 insertions(+)
diff --git a/dlls/msi/tests/action.c b/dlls/msi/tests/action.c index 17bbddc..48a1c88 100644 --- a/dlls/msi/tests/action.c +++ b/dlls/msi/tests/action.c @@ -1086,12 +1086,25 @@ static const char pub_install_exec_seq_dat[] = "RemoveFiles\t\t1700\n" "InstallFiles\t\t2000\n" "PublishComponents\t\t3000\n" + "pub_immediate\tNOT REMOVE\t3001\n" + "pub_deferred\tNOT REMOVE\t3002\n" "UnpublishComponents\t\t3100\n" + "unp_immediate\tREMOVE\t3101\n" + "unp_deferred\tREMOVE\t3102\n" "RegisterProduct\t\t5000\n" "PublishFeatures\t\t5100\n" "PublishProduct\t\t5200\n" "InstallFinalize\t\t6000\n";
+static const char pub_custom_action_dat[] = + "Action\tType\tSource\tTarget\n" + "s72\ti2\tS64\tS0\n" + "CustomAction\tAction\n" + "pub_immediate\t1\tcustom.dll\tpub_absent\n" + "pub_deferred\t1025\tcustom.dll\tpub_present\n" + "unp_immediate\t1\tcustom.dll\tpub_present\n" + "unp_deferred\t1025\tcustom.dll\tpub_absent\n"; + static const char rd_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" @@ -2070,6 +2083,7 @@ static const msi_table pub_tables[] = ADD_TABLE(pub_file), ADD_TABLE(pub_publish_component), ADD_TABLE(pub_install_exec_seq), + ADD_TABLE(pub_custom_action), ADD_TABLE(media), ADD_TABLE(property) }; diff --git a/dlls/msi/tests/custom.c b/dlls/msi/tests/custom.c index 0271384..fed1e5e 100644 --- a/dlls/msi/tests/custom.c +++ b/dlls/msi/tests/custom.c @@ -1464,3 +1464,31 @@ todo_wine ok(hinst, r == ERROR_FILE_NOT_FOUND, "got %u\n", r); return ERROR_SUCCESS; } + +static const char pub_key[] = "Software\Microsoft\Installer\Components\0CBCFA296AC907244845745CEEB2F8AA"; + +UINT WINAPI pub_present(MSIHANDLE hinst) +{ + HKEY key; + LONG res; + +todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) { + res = RegOpenKeyA(HKEY_CURRENT_USER, pub_key, &key); + ok(hinst, !res, "got %u\n", res); + res = RegQueryValueExA(key, "english.txt", NULL, NULL, NULL, NULL); + ok(hinst, !res, "got %u\n", res); +} + RegCloseKey(key); + return ERROR_SUCCESS; +} + +UINT WINAPI pub_absent(MSIHANDLE hinst) +{ + HKEY key; + LONG res; + + res = RegOpenKeyA(HKEY_CURRENT_USER, pub_key, &key); +todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) + ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res); + return ERROR_SUCCESS; +} diff --git a/dlls/msi/tests/custom.spec b/dlls/msi/tests/custom.spec index 3b73765..2dc09e0 100644 --- a/dlls/msi/tests/custom.spec +++ b/dlls/msi/tests/custom.spec @@ -17,6 +17,8 @@ @ stdcall pa_absent(long) @ stdcall ppc_present(long) @ stdcall ppc_absent(long) +@ stdcall pub_present(long) +@ stdcall pub_absent(long) @ stdcall rd_present(long) @ stdcall rd_absent(long) @ stdcall sds_present(long)
Hi,
While running your changed tests on Windows, 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=38611
Your paranoid android.
=== w7u (32 bit msi) === The task timed out
=== wxppro (32 bit custom) === The previous 1 run(s) terminated abnormally
=== w7pro64 (32 bit custom) === The previous 1 run(s) terminated abnormally
=== w7pro64 (64 bit custom) === The previous 1 run(s) terminated abnormally
=== w7u (32 bit action) === The task timed out
Signed-off-by: Hans Leidekker hans@codeweavers.com
test_publish_assemblies() was leaving behind feature data that caused this test to fail when run multiple times.
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/msi/tests/action.c | 10 ++++++++++ dlls/msi/tests/custom.c | 42 ++++++++++++++++++++++++++++++++++++++++++ dlls/msi/tests/custom.spec | 2 ++ 3 files changed, 54 insertions(+)
diff --git a/dlls/msi/tests/action.c b/dlls/msi/tests/action.c index 48a1c88..82ec376 100644 --- a/dlls/msi/tests/action.c +++ b/dlls/msi/tests/action.c @@ -399,11 +399,15 @@ static const char pp_install_exec_seq_dat[] = "ppc_immediate\tPROCESS_COMPONENTS AND ALLUSERS\t1601\n" "ppc_deferred\tPROCESS_COMPONENTS AND ALLUSERS\t1602\n" "UnpublishFeatures\tUNPUBLISH_FEATURES=1 Or FULL=1\t1800\n" + "uf_immediate\tUNPUBLISH_FEATURES AND ALLUSERS\t1801\n" + "uf_deferred\tUNPUBLISH_FEATURES AND ALLUSERS\t1802\n" "RemoveFiles\t\t3500\n" "InstallFiles\t\t4000\n" "RegisterUser\tREGISTER_USER=1 Or FULL=1\t6000\n" "RegisterProduct\tREGISTER_PRODUCT=1 Or FULL=1\t6100\n" "PublishFeatures\tPUBLISH_FEATURES=1 Or FULL=1\t6300\n" + "pf_immediate\tPUBLISH_FEATURES AND ALLUSERS\t6301\n" + "pf_deferred\tPUBLISH_FEATURES AND ALLUSERS\t6302\n" "PublishProduct\tPUBLISH_PRODUCT=1 Or FULL=1\t6400\n" "InstallFinalize\t\t6600";
@@ -411,6 +415,10 @@ static const char pp_custom_action_dat[] = "Action\tType\tSource\tTarget\n" "s72\ti2\tS64\tS0\n" "CustomAction\tAction\n" + "pf_immediate\t1\tcustom.dll\tpf_absent\n" + "pf_deferred\t1025\tcustom.dll\tpf_present\n" + "uf_immediate\t1\tcustom.dll\tpf_present\n" + "uf_deferred\t1025\tcustom.dll\tpf_absent\n" "ppc_immediate\t1\tcustom.dll\tppc_absent\n" "ppc_deferred\t1025\tcustom.dll\tppc_present\n";
@@ -1763,6 +1771,7 @@ static const char pa_install_exec_seq_dat[] = "RegisterProduct\t\t5000\n" "PublishFeatures\t\t5100\n" "PublishProduct\t\t5200\n" + "UnpublishFeatures\t\t5300\n" "InstallFinalize\t\t6000\n";
static const char pa_custom_action_dat[] = @@ -1865,6 +1874,7 @@ static const msi_table pp_tables[] = ADD_TABLE(rof_feature_comp), ADD_TABLE(rof_file), ADD_TABLE(pp_install_exec_seq), + ADD_TABLE(pp_custom_action), ADD_TABLE(rof_media), ADD_TABLE(property), }; diff --git a/dlls/msi/tests/custom.c b/dlls/msi/tests/custom.c index fed1e5e..b76a88b 100644 --- a/dlls/msi/tests/custom.c +++ b/dlls/msi/tests/custom.c @@ -1492,3 +1492,45 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res); return ERROR_SUCCESS; } + +static const char pf_classkey[] = "Installer\Features\84A88FD7F6998CE40A22FB59F6B9C2BB"; +static const char pf_userkey[] = "Software\Microsoft\Windows\CurrentVersion\" + "Installer\UserData\S-1-5-18\Products\84A88FD7F6998CE40A22FB59F6B9C2BB\Features"; + +UINT WINAPI pf_present(MSIHANDLE hinst) +{ + HKEY key; + LONG res; + +todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) { + res = RegOpenKeyExA(HKEY_CLASSES_ROOT, pf_classkey, 0, KEY_READ | KEY_WOW64_64KEY, &key); + ok(hinst, !res, "got %u\n", res); + check_reg_str(hinst, key, "feature", ""); + check_reg_str(hinst, key, "montecristo", ""); + RegCloseKey(key); + + res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, pf_userkey, 0, KEY_READ | KEY_WOW64_64KEY, &key); + ok(hinst, !res, "got %u\n", res); + check_reg_str(hinst, key, "feature", "VGtfp^p+,?82@JU1j_KE"); + check_reg_str(hinst, key, "montecristo", "VGtfp^p+,?82@JU1j_KE"); + RegCloseKey(key); +} + + return ERROR_SUCCESS; +} + +UINT WINAPI pf_absent(MSIHANDLE hinst) +{ + HKEY key; + LONG res; + + res = RegOpenKeyExA(HKEY_CLASSES_ROOT, pf_classkey, 0, KEY_READ | KEY_WOW64_64KEY, &key); +todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) + ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res); + + res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, pf_userkey, 0, KEY_READ | KEY_WOW64_64KEY, &key); +todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) + ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res); + + return ERROR_SUCCESS; +} diff --git a/dlls/msi/tests/custom.spec b/dlls/msi/tests/custom.spec index 2dc09e0..2092570 100644 --- a/dlls/msi/tests/custom.spec +++ b/dlls/msi/tests/custom.spec @@ -15,6 +15,8 @@ @ stdcall odbc_absent(long) @ stdcall pa_present(long) @ stdcall pa_absent(long) +@ stdcall pf_present(long) +@ stdcall pf_absent(long) @ stdcall ppc_present(long) @ stdcall ppc_absent(long) @ stdcall pub_present(long)
Hi,
While running your changed tests on Windows, 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=38612
Your paranoid android.
=== w7u (32 bit custom) === The previous 1 run(s) terminated abnormally
=== w7pro64 (32 bit custom) === The previous 1 run(s) terminated abnormally
=== w7pro64 (64 bit custom) === The previous 1 run(s) terminated abnormally
On 22/05/18 23:06, Marvin wrote:
Hi,
While running your changed tests on Windows, 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=38612
Your paranoid android.
=== w7u (32 bit custom) === The previous 1 run(s) terminated abnormally
=== w7pro64 (32 bit custom) === The previous 1 run(s) terminated abnormally
=== w7pro64 (64 bit custom) === The previous 1 run(s) terminated abnormally
It's fairly obvious this isn't the fault of the patches I'm sending, but all the same it would be good to find out what's wrong with this, if only so as to stop spamming wine-devel. I can't seem to glean any useful information from the available logs [1]; François, do you have any immediate idea what's going wrong?
[1] https://testbot.winehq.org/JobDetails.pl?Key=38612&log_2009=2&scrsho...
Signed-off-by: Hans Leidekker hans@codeweavers.com
Hi,
While running your changed tests on Windows, 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=38608
Your paranoid android.
=== wvistau64 (64 bit patch) === TestBot process got stuck or died unexpectedly The previous 1 run(s) terminated abnormally
=== w7pro64 (32 bit custom) === The previous 1 run(s) terminated abnormally
=== w7pro64 (64 bit custom) === The previous 1 run(s) terminated abnormally