Zhiyi Zhang : setupapi/tests: Fix timeout on win10 1809+.

Alexandre Julliard julliard at winehq.org
Mon Nov 18 16:19:19 CST 2019


Module: wine
Branch: master
Commit: 177d6d7f8981b9e036437d78023b76232dcadb3d
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=177d6d7f8981b9e036437d78023b76232dcadb3d

Author: Zhiyi Zhang <zzhang at codeweavers.com>
Date:   Mon Nov 18 17:29:02 2019 +0800

setupapi/tests: Fix timeout on win10 1809+.

Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/setupapi/tests/devinst.c | 50 +++++++++++++++++++++----------------------
 1 file changed, 25 insertions(+), 25 deletions(-)

diff --git a/dlls/setupapi/tests/devinst.c b/dlls/setupapi/tests/devinst.c
index 57adeeb27b..452a570c4f 100644
--- a/dlls/setupapi/tests/devinst.c
+++ b/dlls/setupapi/tests/devinst.c
@@ -2065,12 +2065,6 @@ static void test_get_actual_section(void)
     ok(!strcasecmp(section, "section1"), "Got unexpected section %s.\n", section);
     ok(size == 9, "Got size %u.\n", size);
 
-    extptr = section;
-    ret = SetupDiGetActualSectionToInstallA(hinf, "section1", section, ARRAY_SIZE(section), NULL, &extptr);
-    ok(ret, "Failed to get section, error %#x.\n", GetLastError());
-    ok(!strcasecmp(section, "section1"), "Got unexpected section %s.\n", section);
-    ok(!extptr || !*extptr /* Windows 10 1809 */, "Got extension %s.\n", extptr);
-
     extptr = section;
     ret = SetupDiGetActualSectionToInstallA(hinf, "section2", section, ARRAY_SIZE(section), NULL, &extptr);
     ok(ret, "Failed to get section, error %#x.\n", GetLastError());
@@ -2101,24 +2095,6 @@ static void test_get_actual_section(void)
     ok(!strcasecmp(section, "section6.NT" MYEXT), "Got unexpected section %s.\n", section);
     ok(extptr == section + 8, "Got extension %s.\n", extptr);
 
-    extptr = section;
-    ret = SetupDiGetActualSectionToInstallA(hinf, "section7", section, ARRAY_SIZE(section), NULL, &extptr);
-    ok(ret, "Failed to get section, error %#x.\n", GetLastError());
-    ok(!strcasecmp(section, "section7"), "Got unexpected section %s.\n", section);
-    ok(!extptr || !*extptr /* Windows 10 1809 */, "Got extension %s.\n", extptr);
-
-    extptr = section;
-    ret = SetupDiGetActualSectionToInstallA(hinf, "section8", section, ARRAY_SIZE(section), NULL, &extptr);
-    ok(ret, "Failed to get section, error %#x.\n", GetLastError());
-    ok(!strcasecmp(section, "section8"), "Got unexpected section %s.\n", section);
-    ok(!extptr || !*extptr /* Windows 10 1809 */, "Got extension %s.\n", extptr);
-
-    extptr = section;
-    ret = SetupDiGetActualSectionToInstallA(hinf, "nonexistent", section, ARRAY_SIZE(section), NULL, &extptr);
-    ok(ret, "Failed to get section, error %#x.\n", GetLastError());
-    ok(!strcasecmp(section, "nonexistent"), "Got unexpected section %s.\n", section);
-    ok(!extptr || !*extptr /* Windows 10 1809 */, "Got extension %s.\n", extptr);
-
     extptr = section;
     ret = SetupDiGetActualSectionToInstallA(hinf, "section9", section, ARRAY_SIZE(section), NULL, &extptr);
     ok(ret, "Failed to get section, error %#x.\n", GetLastError());
@@ -2127,7 +2103,31 @@ static void test_get_actual_section(void)
 
     if (0)
     {
-        /* For some reason, this call hangs on Windows 10 1809. */
+        /* For some reason, these calls hang on Windows 10 1809+. */
+        extptr = section;
+        ret = SetupDiGetActualSectionToInstallA(hinf, "section1", section, ARRAY_SIZE(section), NULL, &extptr);
+        ok(ret, "Failed to get section, error %#x.\n", GetLastError());
+        ok(!strcasecmp(section, "section1"), "Got unexpected section %s.\n", section);
+        ok(!extptr || !*extptr /* Windows 10 1809 */, "Got extension %s.\n", extptr);
+
+        extptr = section;
+        ret = SetupDiGetActualSectionToInstallA(hinf, "section7", section, ARRAY_SIZE(section), NULL, &extptr);
+        ok(ret, "Failed to get section, error %#x.\n", GetLastError());
+        ok(!strcasecmp(section, "section7"), "Got unexpected section %s.\n", section);
+        ok(!extptr || !*extptr /* Windows 10 1809 */, "Got extension %s.\n", extptr);
+
+        extptr = section;
+        ret = SetupDiGetActualSectionToInstallA(hinf, "section8", section, ARRAY_SIZE(section), NULL, &extptr);
+        ok(ret, "Failed to get section, error %#x.\n", GetLastError());
+        ok(!strcasecmp(section, "section8"), "Got unexpected section %s.\n", section);
+        ok(!extptr || !*extptr /* Windows 10 1809 */, "Got extension %s.\n", extptr);
+
+        extptr = section;
+        ret = SetupDiGetActualSectionToInstallA(hinf, "nonexistent", section, ARRAY_SIZE(section), NULL, &extptr);
+        ok(ret, "Failed to get section, error %#x.\n", GetLastError());
+        ok(!strcasecmp(section, "nonexistent"), "Got unexpected section %s.\n", section);
+        ok(!extptr || !*extptr /* Windows 10 1809 */, "Got extension %s.\n", extptr);
+
         extptr = section;
         ret = SetupDiGetActualSectionToInstallA(hinf, "section10", section, ARRAY_SIZE(section), NULL, &extptr);
         ok(ret, "Failed to get section, error %#x.\n", GetLastError());




More information about the wine-cvs mailing list