Skip to content

Commit cdbd009

Browse files
winesynclearn-more
authored andcommitted
[WINESYNC] msi/tests: Remove duplicate service tests.
Signed-off-by: Hans Leidekker <[email protected]> Signed-off-by: Alexandre Julliard <[email protected]> wine commit id f655bb7ee71a5e271fc7091013a60bb799b315df by Hans Leidekker <[email protected]>
1 parent 5239ed5 commit cdbd009

File tree

1 file changed

+5
-81
lines changed

1 file changed

+5
-81
lines changed

modules/rostests/winetests/msi/install.c

Lines changed: 5 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,7 @@ static const CHAR component_dat[] = "Component\tComponentId\tDirectory_\tAttribu
8484
"Three\t{010B6ADD-B27D-4EDD-9B3D-34C4F7D61684}\tCHANGEDDIR\t2\t\tthree.txt\n"
8585
"Two\t{BF03D1A6-20DA-4A65-82F3-6CAC995915CE}\tFIRSTDIR\t2\t\ttwo.txt\n"
8686
"dangler\t{6091DF25-EF96-45F1-B8E9-A9B1420C7A3C}\tTARGETDIR\t4\t\tregdata\n"
87-
"component\t\tMSITESTDIR\t0\t1\tfile\n"
88-
"service_comp\t\tMSITESTDIR\t0\t1\tservice_file";
87+
"component\t\tMSITESTDIR\t0\t1\tfile\n";
8988

9089
static const CHAR directory_dat[] = "Directory\tDirectory_Parent\tDefaultDir\n"
9190
"s72\tS72\tl255\n"
@@ -106,8 +105,7 @@ static const CHAR feature_dat[] = "Feature\tFeature_Parent\tTitle\tDescription\t
106105
"One\t\tOne\tThe One Feature\t1\t3\tMSITESTDIR\t0\n"
107106
"Three\t\tThree\tThe Three Feature\t3\t3\tCHANGEDDIR\t0\n"
108107
"Two\t\tTwo\tThe Two Feature\t2\t3\tFIRSTDIR\t0\n"
109-
"feature\t\t\t\t2\t1\tTARGETDIR\t0\n"
110-
"service_feature\t\t\t\t2\t1\tTARGETDIR\t0";
108+
"feature\t\t\t\t2\t1\tTARGETDIR\t0\n";
111109

112110
static const CHAR feature_comp_dat[] = "Feature_\tComponent_\n"
113111
"s38\ts72\n"
@@ -117,8 +115,7 @@ static const CHAR feature_comp_dat[] = "Feature_\tComponent_\n"
117115
"One\tOne\n"
118116
"Three\tThree\n"
119117
"Two\tTwo\n"
120-
"feature\tcomponent\n"
121-
"service_feature\tservice_comp\n";
118+
"feature\tcomponent\n";
122119

123120
static const CHAR file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
124121
"s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
@@ -128,8 +125,7 @@ static const CHAR file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tL
128125
"one.txt\tOne\tone.txt\t1000\t\t\t0\t1\n"
129126
"three.txt\tThree\tthree.txt\t1000\t\t\t0\t3\n"
130127
"two.txt\tTwo\ttwo.txt\t1000\t\t\t0\t2\n"
131-
"file\tcomponent\tfilename\t100\t\t\t8192\t1\n"
132-
"service_file\tservice_comp\tservice.exe\t100\t\t\t8192\t1";
128+
"file\tcomponent\tfilename\t100\t\t\t8192\t1\n";
133129

134130
static const CHAR install_exec_seq_dat[] = "Action\tCondition\tSequence\n"
135131
"s72\tS255\tI2\n"
@@ -144,7 +140,6 @@ static const CHAR install_exec_seq_dat[] = "Action\tCondition\tSequence\n"
144140
"DuplicateFiles\t\t4500\n"
145141
"WriteEnvironmentStrings\t\t4550\n"
146142
"CreateShortcuts\t\t4600\n"
147-
"InstallServices\t\t5000\n"
148143
"InstallFinalize\t\t6600\n"
149144
"InstallInitialize\t\t1500\n"
150145
"InstallValidate\t\t1400\n"
@@ -177,8 +172,6 @@ static const CHAR property_dat[] = "Property\tValue\n"
177172
"UpgradeCode\t{4C0EAA15-0264-4E5A-8758-609EF142B92D}\n"
178173
"AdminProperties\tPOSTADMIN\n"
179174
"ROOTDRIVE\tC:\\\n"
180-
"SERVNAME\tTestService\n"
181-
"SERVDISP\tTestServiceDisp\n"
182175
"MSIFASTINSTALL\t1\n";
183176

184177
static const CHAR aup_property_dat[] = "Property\tValue\n"
@@ -201,8 +194,6 @@ static const CHAR aup_property_dat[] = "Property\tValue\n"
201194
"UpgradeCode\t{4C0EAA15-0264-4E5A-8758-609EF142B92D}\n"
202195
"AdminProperties\tPOSTADMIN\n"
203196
"ROOTDRIVE\tC:\\\n"
204-
"SERVNAME\tTestService\n"
205-
"SERVDISP\tTestServiceDisp\n"
206197
"MSIFASTINSTALL\t1\n";
207198

208199
static const CHAR aup2_property_dat[] = "Property\tValue\n"
@@ -225,8 +216,6 @@ static const CHAR aup2_property_dat[] = "Property\tValue\n"
225216
"UpgradeCode\t{4C0EAA15-0264-4E5A-8758-609EF142B92D}\n"
226217
"AdminProperties\tPOSTADMIN\n"
227218
"ROOTDRIVE\tC:\\\n"
228-
"SERVNAME\tTestService\n"
229-
"SERVDISP\tTestServiceDisp\n"
230219
"MSIFASTINSTALL\t1\n";
231220

232221
static const CHAR icon_property_dat[] = "Property\tValue\n"
@@ -248,8 +237,6 @@ static const CHAR icon_property_dat[] = "Property\tValue\n"
248237
"UpgradeCode\t{4C0EAA15-0264-4E5A-8758-609EF142B92D}\n"
249238
"AdminProperties\tPOSTADMIN\n"
250239
"ROOTDRIVE\tC:\\\n"
251-
"SERVNAME\tTestService\n"
252-
"SERVDISP\tTestServiceDisp\n"
253240
"MSIFASTINSTALL\t1\n";
254241

255242
static const CHAR shortcut_dat[] = "Shortcut\tDirectory_\tName\tComponent_\tTarget\tArguments\tDescription\tHotkey\tIcon_\tIconIndex\tShowCmd\tWkDir\n"
@@ -281,8 +268,6 @@ static const CHAR up_property_dat[] = "Property\tValue\n"
281268
"UpgradeCode\t{4C0EAA15-0264-4E5A-8758-609EF142B92D}\n"
282269
"AdminProperties\tPOSTADMIN\n"
283270
"ROOTDRIVE\tC:\\\n"
284-
"SERVNAME\tTestService\n"
285-
"SERVDISP\tTestServiceDisp\n"
286271
"RemovePreviousVersions\t1\n"
287272
"MSIFASTINSTALL\t1\n";
288273

@@ -305,8 +290,6 @@ static const CHAR up2_property_dat[] = "Property\tValue\n"
305290
"UpgradeCode\t{4C0EAA15-0264-4E5A-8758-609EF142B92D}\n"
306291
"AdminProperties\tPOSTADMIN\n"
307292
"ROOTDRIVE\tC:\\\n"
308-
"SERVNAME\tTestService\n"
309-
"SERVDISP\tTestServiceDisp\n"
310293
"MSIFASTINSTALL\t1\n";
311294

312295
static const CHAR up3_property_dat[] = "Property\tValue\n"
@@ -328,8 +311,6 @@ static const CHAR up3_property_dat[] = "Property\tValue\n"
328311
"UpgradeCode\t{4C0EAA15-0264-4E5A-8758-609EF142B92D}\n"
329312
"AdminProperties\tPOSTADMIN\n"
330313
"ROOTDRIVE\tC:\\\n"
331-
"SERVNAME\tTestService\n"
332-
"SERVDISP\tTestServiceDisp\n"
333314
"RemovePreviousVersions\t1\n"
334315
"MSIFASTINSTALL\t1\n";
335316

@@ -341,17 +322,6 @@ static const CHAR registry_dat[] = "Registry\tRoot\tKey\tName\tValue\tComponent_
341322
"regdata\t1\tSOFTWARE\\Wine\\msitest\tblah\tbad\tdangler\n"
342323
"OrderTest\t1\tSOFTWARE\\Wine\\msitest\tOrderTestName\tOrderTestValue\tcomponent";
343324

344-
static const CHAR service_install_dat[] = "ServiceInstall\tName\tDisplayName\tServiceType\tStartType\tErrorControl\t"
345-
"LoadOrderGroup\tDependencies\tStartName\tPassword\tArguments\tComponent_\tDescription\n"
346-
"s72\ts255\tL255\ti4\ti4\ti4\tS255\tS255\tS255\tS255\tS255\ts72\tL255\n"
347-
"ServiceInstall\tServiceInstall\n"
348-
"TestService\t[SERVNAME]\t[SERVDISP]\t2\t3\t0\t\t\tTestService\t\t\tservice_comp\t\t";
349-
350-
static const CHAR service_control_dat[] = "ServiceControl\tName\tEvent\tArguments\tWait\tComponent_\n"
351-
"s72\tl255\ti2\tL255\tI2\ts72\n"
352-
"ServiceControl\tServiceControl\n"
353-
"ServiceControl\tTestService\t8\t\t0\tservice_comp";
354-
355325
/* tables for test_continuouscabs */
356326
static const CHAR cc_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
357327
"s72\tS38\ts72\ti2\tS255\tS72\n"
@@ -859,8 +829,7 @@ static const CHAR ai_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion
859829
"one.txt\tOne\tone.txt\t1000\t\t\t16384\t1\n"
860830
"three.txt\tThree\tthree.txt\t1000\t\t\t16384\t3\n"
861831
"two.txt\tTwo\ttwo.txt\t1000\t\t\t16384\t2\n"
862-
"file\tcomponent\tfilename\t100\t\t\t8192\t1\n"
863-
"service_file\tservice_comp\tservice.exe\t100\t\t\t8192\t1";
832+
"file\tcomponent\tfilename\t100\t\t\t8192\t1\n";
864833

865834
static const CHAR ip_install_exec_seq_dat[] = "Action\tCondition\tSequence\n"
866835
"s72\tS255\tI2\n"
@@ -1358,8 +1327,6 @@ static const msi_table tables[] =
13581327
ADD_TABLE(media),
13591328
ADD_TABLE(property),
13601329
ADD_TABLE(registry),
1361-
ADD_TABLE(service_install),
1362-
ADD_TABLE(service_control)
13631330
};
13641331

13651332
static const msi_table sc_tables[] =
@@ -1399,8 +1366,6 @@ static const msi_table up_tables[] =
13991366
ADD_TABLE(media),
14001367
ADD_TABLE(up_property),
14011368
ADD_TABLE(registry),
1402-
ADD_TABLE(service_install),
1403-
ADD_TABLE(service_control)
14041369
};
14051370

14061371
static const msi_table up2_tables[] =
@@ -1414,8 +1379,6 @@ static const msi_table up2_tables[] =
14141379
ADD_TABLE(media),
14151380
ADD_TABLE(up2_property),
14161381
ADD_TABLE(registry),
1417-
ADD_TABLE(service_install),
1418-
ADD_TABLE(service_control)
14191382
};
14201383

14211384
static const msi_table up3_tables[] =
@@ -1429,8 +1392,6 @@ static const msi_table up3_tables[] =
14291392
ADD_TABLE(media),
14301393
ADD_TABLE(up3_property),
14311394
ADD_TABLE(registry),
1432-
ADD_TABLE(service_install),
1433-
ADD_TABLE(service_control)
14341395
};
14351396

14361397
static const msi_table up4_tables[] =
@@ -1444,8 +1405,6 @@ static const msi_table up4_tables[] =
14441405
ADD_TABLE(media),
14451406
ADD_TABLE(property),
14461407
ADD_TABLE(registry),
1447-
ADD_TABLE(service_install),
1448-
ADD_TABLE(service_control)
14491408
};
14501409

14511410
static const msi_table up5_tables[] =
@@ -1459,8 +1418,6 @@ static const msi_table up5_tables[] =
14591418
ADD_TABLE(media),
14601419
ADD_TABLE(up_property),
14611420
ADD_TABLE(registry),
1462-
ADD_TABLE(service_install),
1463-
ADD_TABLE(service_control)
14641421
};
14651422

14661423
static const msi_table up6_tables[] =
@@ -1474,8 +1431,6 @@ static const msi_table up6_tables[] =
14741431
ADD_TABLE(media),
14751432
ADD_TABLE(up2_property),
14761433
ADD_TABLE(registry),
1477-
ADD_TABLE(service_install),
1478-
ADD_TABLE(service_control)
14791434
};
14801435

14811436
static const msi_table up7_tables[] =
@@ -1489,8 +1444,6 @@ static const msi_table up7_tables[] =
14891444
ADD_TABLE(media),
14901445
ADD_TABLE(up3_property),
14911446
ADD_TABLE(registry),
1492-
ADD_TABLE(service_install),
1493-
ADD_TABLE(service_control)
14941447
};
14951448

14961449
static const msi_table cc_tables[] =
@@ -2409,7 +2362,6 @@ static void create_test_files(void)
24092362
create_cab_file("msitest.cab", MEDIA_SIZE, "four.txt\0five.txt\0");
24102363

24112364
create_file("msitest\\filename", 100);
2412-
create_file("msitest\\service.exe", 100);
24132365

24142366
DeleteFileA("four.txt");
24152367
DeleteFileA("five.txt");
@@ -2487,7 +2439,6 @@ static void delete_test_files(void)
24872439
DeleteFileA("msitest\\second\\three.txt");
24882440
DeleteFileA("msitest\\first\\two.txt");
24892441
DeleteFileA("msitest\\one.txt");
2490-
DeleteFileA("msitest\\service.exe");
24912442
DeleteFileA("msitest\\filename");
24922443
RemoveDirectoryA("msitest\\second");
24932444
RemoveDirectoryA("msitest\\first");
@@ -2506,7 +2457,6 @@ static void delete_pf_files(void)
25062457
ok(delete_pf("msitest\\first", FALSE), "Directory not created\n");
25072458
ok(delete_pf("msitest\\one.txt", TRUE), "File not installed\n");
25082459
ok(delete_pf("msitest\\filename", TRUE), "File not installed\n");
2509-
ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n");
25102460
ok(delete_pf("msitest", FALSE), "Directory not created\n");
25112461
}
25122462

@@ -2656,24 +2606,6 @@ void create_database_wordcount(const CHAR *name, const msi_table *tables, int nu
26562606
HeapFree( GetProcessHeap(), 0, nameW );
26572607
}
26582608

2659-
static void check_service_is_installed(void)
2660-
{
2661-
SC_HANDLE scm, service;
2662-
BOOL res;
2663-
2664-
scm = OpenSCManagerA(NULL, NULL, SC_MANAGER_ALL_ACCESS);
2665-
ok(scm != NULL, "Failed to open the SC Manager\n");
2666-
2667-
service = OpenServiceA(scm, "TestService", SC_MANAGER_ALL_ACCESS);
2668-
ok(service != NULL, "Failed to open TestService\n");
2669-
2670-
res = DeleteService(service);
2671-
ok(res, "Failed to delete TestService\n");
2672-
2673-
CloseServiceHandle(service);
2674-
CloseServiceHandle(scm);
2675-
}
2676-
26772609
static BOOL notify_system_change(DWORD event_type, STATEMGRSTATUS *status)
26782610
{
26792611
RESTOREPOINTINFOA spec;
@@ -2777,8 +2709,6 @@ static void test_MsiInstallProduct(void)
27772709
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
27782710
ok(!lstrcmpA(path, "OrderTestValue"), "Expected OrderTestValue, got %s\n", path);
27792711

2780-
check_service_is_installed();
2781-
27822712
delete_key(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest", access);
27832713

27842714
/* not published, reinstall */
@@ -4823,7 +4753,6 @@ static void test_adminimage(void)
48234753
create_file("msitest\\cabout\\four.txt", 100);
48244754
create_file("msitest\\cabout\\new\\five.txt", 100);
48254755
create_file("msitest\\filename", 100);
4826-
create_file("msitest\\service.exe", 100);
48274756

48284757
create_database_wordcount(msifile, ai_tables,
48294758
sizeof(ai_tables) / sizeof(msi_table),
@@ -4849,7 +4778,6 @@ static void test_adminimage(void)
48494778
DeleteFileA("msitest\\second\\three.txt");
48504779
DeleteFileA("msitest\\first\\two.txt");
48514780
DeleteFileA("msitest\\one.txt");
4852-
DeleteFileA("msitest\\service.exe");
48534781
DeleteFileA("msitest\\filename");
48544782
RemoveDirectoryA("msitest\\cabout\\new");
48554783
RemoveDirectoryA("msitest\\cabout");
@@ -5049,7 +4977,6 @@ static void test_preselected(void)
50494977
ok(!delete_pf("msitest\\first", FALSE), "Directory created\n");
50504978
ok(!delete_pf("msitest\\filename", TRUE), "File installed\n");
50514979
ok(delete_pf("msitest\\one.txt", TRUE), "File not installed\n");
5052-
ok(!delete_pf("msitest\\service.exe", TRUE), "File installed\n");
50534980
ok(delete_pf("msitest", FALSE), "Directory not created\n");
50544981

50554982
r = MsiInstallProductA(msifile, NULL);
@@ -5065,7 +4992,6 @@ static void test_preselected(void)
50654992
ok(delete_pf("msitest\\first", FALSE), "Directory not created\n");
50664993
ok(delete_pf("msitest\\filename", TRUE), "File not installed\n");
50674994
ok(!delete_pf("msitest\\one.txt", TRUE), "File installed\n");
5068-
ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n");
50694995
ok(delete_pf("msitest", FALSE), "Directory not created\n");
50704996

50714997
error:
@@ -6162,7 +6088,6 @@ static void test_wow64(void)
61626088
ok(!delete_pf("msitest\\first", FALSE), "Directory created\n");
61636089
ok(!delete_pf("msitest\\one.txt", TRUE), "File installed\n");
61646090
ok(!delete_pf("msitest\\filename", TRUE), "File installed\n");
6165-
ok(!delete_pf("msitest\\service.exe", TRUE), "File installed\n");
61666091
ok(!delete_pf("msitest", FALSE), "Directory created\n");
61676092

61686093
ok(delete_pf_native("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n");
@@ -6175,7 +6100,6 @@ static void test_wow64(void)
61756100
ok(delete_pf_native("msitest\\first", FALSE), "Directory not created\n");
61766101
ok(delete_pf_native("msitest\\one.txt", TRUE), "File not installed\n");
61776102
ok(delete_pf_native("msitest\\filename", TRUE), "File not installed\n");
6178-
ok(delete_pf_native("msitest\\service.exe", TRUE), "File not installed\n");
61796103
ok(delete_pf_native("msitest", FALSE), "Directory not created\n");
61806104

61816105
pWow64RevertWow64FsRedirection(cookie);

0 commit comments

Comments
 (0)