Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/setupapi/tests/install.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/setupapi/tests/install.c b/dlls/setupapi/tests/install.c index 44b7d09d1e5..4a452435652 100644 --- a/dlls/setupapi/tests/install.c +++ b/dlls/setupapi/tests/install.c @@ -2054,12 +2054,14 @@ static void test_start_copy(void) ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#x.\n", GetLastError()); ret = SetupQueueCopyA(queue, "src", NULL, "one.txt", NULL, NULL, "dst", NULL, 0); ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ret = SetupQueueCopyA(queue, "src", NULL, "one.txt", NULL, NULL, "dst", NULL, 0); + ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); ret = SetupQueueCopyA(queue, "src", NULL, "two.txt", NULL, NULL, "dst", NULL, 0); ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); ret = SetupQueueCopyA(queue, "src", NULL, "three.txt", NULL, NULL, "dst", NULL, 0); ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); run_queue(queue, start_copy_cb); - ok(got_start_copy == 3, "Got %u callbacks.\n", got_start_copy); + todo_wine ok(got_start_copy == 3, "Got %u callbacks.\n", got_start_copy); ok(delete_file("dst/one.txt"), "Destination file should exist.\n"); ok(delete_file("dst/two.txt"), "Destination file should exist.\n"); ok(delete_file("dst/three.txt"), "Destination file should exist.\n");
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/setupapi/tests/install.c | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-)
diff --git a/dlls/setupapi/tests/install.c b/dlls/setupapi/tests/install.c index 4a452435652..3a40f1450ab 100644 --- a/dlls/setupapi/tests/install.c +++ b/dlls/setupapi/tests/install.c @@ -1065,9 +1065,13 @@ static void test_install_files_queue(void) { static const char inf_data[] = "[Version]\n" "Signature="$Chicago$"\n" + "[DefaultInstall]\n" - "CopyFiles=files_section\n" - "[files_section]\n" + "CopyFiles=copy_section\n" + "DelFiles=delete_section\n" + "RenFiles=rename_section\n" + + "[copy_section]\n" "one.txt\n" "two.txt\n" "three.txt\n" @@ -1076,11 +1080,19 @@ static void test_install_files_queue(void) "six.txt\n" "seven.txt\n" "eight.txt\n" + + "[delete_section]\n" + "nine.txt\n" + + "[rename_section]\n" + "eleven.txt,ten.txt\n" + "[SourceDisksNames]\n" "1=heis\n" "2=duo,,,alpha\n" "3=treis,treis.cab\n" "4=tessares,tessares.cab,,alpha\n" + "[SourceDisksFiles]\n" "one.txt=1\n" "two.txt=1,beta\n" @@ -1090,8 +1102,11 @@ static void test_install_files_queue(void) "six.txt=3,beta\n" "seven.txt=4\n" "eight.txt=4,beta\n" + "[DestinationDirs]\n" - "files_section=40000,dst\n"; + "copy_section=40000,dst\n" + "delete_section=40000,dst\n" + "rename_section=40000,dst\n";
char path[MAX_PATH + 9]; HSPFILEQ queue; @@ -1116,12 +1131,17 @@ static void test_install_files_queue(void) ret = SetupSetDirectoryIdA(hinf, 40000, CURR_DIR); ok(ret, "Failed to set directory ID, error %u.\n", GetLastError());
+ ret = CreateDirectoryA("dst", NULL); + ok(ret, "Failed to create test directory, error %u.\n", GetLastError()); + create_file("src/one.txt"); create_file("src/beta/two.txt"); create_file("src/alpha/three.txt"); create_file("src/alpha/beta/four.txt"); create_cab_file("src/treis.cab", "src\beta\five.txt\0six.txt\0"); create_cab_file("src/alpha/tessares.cab", "seven.txt\0eight.txt\0"); + create_file("dst/nine.txt"); + create_file("dst/ten.txt");
queue = SetupOpenFileQueue(); ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#x.\n", GetLastError()); @@ -1147,6 +1167,9 @@ static void test_install_files_queue(void) ok(delete_file("dst/six.txt"), "Destination file should exist.\n"); ok(delete_file("dst/seven.txt"), "Destination file should exist.\n"); ok(delete_file("dst/eight.txt"), "Destination file should exist.\n"); + todo_wine ok(!delete_file("dst/nine.txt"), "Destination file should not exist.\n"); + todo_wine ok(!delete_file("dst/ten.txt"), "Destination file should not exist.\n"); + todo_wine ok(delete_file("dst/eleven.txt"), "Destination file should exist.\n");
SetupTermDefaultQueueCallback(context); ret = SetupCloseFileQueue(queue);
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/setupapi/install.c | 4 +++- dlls/setupapi/tests/install.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/setupapi/install.c b/dlls/setupapi/install.c index 28ef0820ebf..58a19fa8a68 100644 --- a/dlls/setupapi/install.c +++ b/dlls/setupapi/install.c @@ -1027,7 +1027,9 @@ BOOL WINAPI SetupInstallFilesFromInfSectionW( HINF hinf, HINF hlayout, HSPFILEQ info.src_root = src_root; info.copy_flags = flags; info.layout = hlayout; - return iterate_section_fields( hinf, section, L"CopyFiles", copy_files_callback, &info ); + return iterate_section_fields( hinf, section, L"CopyFiles", copy_files_callback, &info ) && + iterate_section_fields( hinf, section, L"DelFiles", delete_files_callback, &info ) && + iterate_section_fields( hinf, section, L"RenFiles", rename_files_callback, &info ); }
diff --git a/dlls/setupapi/tests/install.c b/dlls/setupapi/tests/install.c index 3a40f1450ab..7659353fd05 100644 --- a/dlls/setupapi/tests/install.c +++ b/dlls/setupapi/tests/install.c @@ -1167,7 +1167,7 @@ static void test_install_files_queue(void) ok(delete_file("dst/six.txt"), "Destination file should exist.\n"); ok(delete_file("dst/seven.txt"), "Destination file should exist.\n"); ok(delete_file("dst/eight.txt"), "Destination file should exist.\n"); - todo_wine ok(!delete_file("dst/nine.txt"), "Destination file should not exist.\n"); + ok(!delete_file("dst/nine.txt"), "Destination file should not exist.\n"); todo_wine ok(!delete_file("dst/ten.txt"), "Destination file should not exist.\n"); todo_wine ok(delete_file("dst/eleven.txt"), "Destination file should exist.\n");
Hi,
While running your changed tests, 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=107162
Your paranoid android.
=== debian11 (32 bit report) ===
setupapi: install.c:1171: Test succeeded inside todo block: Destination file should not exist.
=== debian11 (32 bit Arabic:Morocco report) ===
setupapi: install.c:1171: Test succeeded inside todo block: Destination file should not exist.
=== debian11 (32 bit German report) ===
setupapi: install.c:1171: Test succeeded inside todo block: Destination file should not exist.
=== debian11 (32 bit French report) ===
setupapi: install.c:1171: Test succeeded inside todo block: Destination file should not exist.
=== debian11 (32 bit Hebrew:Israel report) ===
setupapi: install.c:1171: Test succeeded inside todo block: Destination file should not exist.
=== debian11 (32 bit Hindi:India report) ===
setupapi: install.c:1171: Test succeeded inside todo block: Destination file should not exist.
=== debian11 (32 bit Japanese:Japan report) ===
setupapi: install.c:1171: Test succeeded inside todo block: Destination file should not exist.
=== debian11 (32 bit Chinese:China report) ===
setupapi: install.c:1171: Test succeeded inside todo block: Destination file should not exist.
=== debian11 (32 bit WoW report) ===
setupapi: install.c:1171: Test succeeded inside todo block: Destination file should not exist.
=== debian11 (64 bit WoW report) ===
setupapi: install.c:1171: Test succeeded inside todo block: Destination file should not exist.
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/setupapi/install.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/dlls/setupapi/install.c b/dlls/setupapi/install.c index 58a19fa8a68..3a72c5f527d 100644 --- a/dlls/setupapi/install.c +++ b/dlls/setupapi/install.c @@ -1088,17 +1088,10 @@ BOOL WINAPI SetupInstallFromInfSectionW( HWND owner, HINF hinf, PCWSTR section, } if (flags & SPINST_FILES) { - struct files_callback_info info; HSPFILEQ queue;
if (!(queue = SetupOpenFileQueue())) return FALSE; - info.queue = queue; - info.src_root = src_root; - info.copy_flags = copy_flags; - info.layout = hinf; - ret = (iterate_section_fields( hinf, section, L"CopyFiles", copy_files_callback, &info ) && - iterate_section_fields( hinf, section, L"DelFiles", delete_files_callback, &info ) && - iterate_section_fields( hinf, section, L"RenFiles", rename_files_callback, &info ) && + ret = (SetupInstallFilesFromInfSectionW( hinf, NULL, queue, section, src_root, copy_flags ) && SetupCommitFileQueueW( owner, queue, callback, context )); SetupCloseFileQueue( queue ); if (!ret) return FALSE;
Hi,
While running your changed tests, 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=107163
Your paranoid android.
=== debian11 (32 bit report) ===
setupapi: install.c:1171: Test succeeded inside todo block: Destination file should not exist.
=== debian11 (32 bit Chinese:China report) ===
setupapi: install.c:1171: Test succeeded inside todo block: Destination file should not exist.
=== debian11 (32 bit WoW report) ===
setupapi: install.c:1171: Test succeeded inside todo block: Destination file should not exist.
=== debian11 (64 bit WoW report) ===
setupapi: install.c:1171: Test succeeded inside todo block: Destination file should not exist.