[PATCH 1/4] setupapi/tests: Fix timeout on win10 1809+.

Zhiyi Zhang zzhang at codeweavers.com
Mon Nov 18 03:29:02 CST 2019


Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
---
 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());
-- 
2.24.0




More information about the wine-devel mailing list