Alex Henrie : advapi32/tests: Accept more broken values in the RegEnumValue name overflow tests.

Alexandre Julliard julliard at winehq.org
Fri Dec 10 15:07:52 CST 2021


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

Author: Alex Henrie <alexhenrie24 at gmail.com>
Date:   Thu Dec  9 22:32:58 2021 -0700

advapi32/tests: Accept more broken values in the RegEnumValue name overflow tests.

Fixes several intermittent testbot failures.

Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/advapi32/tests/registry.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c
index d09fe9a4add..c4f63c6cd27 100644
--- a/dlls/advapi32/tests/registry.c
+++ b/dlls/advapi32/tests/registry.c
@@ -548,12 +548,13 @@ static void test_enum_value(void)
     res = RegEnumValueA( test_key, 0, value, &val_count, NULL, &type, (LPBYTE)data, &data_count );
     ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %d\n", res );
     ok( val_count == 3, "val_count set to %d\n", val_count );
-    ok( data_count == 7 || broken( data_count == 8 ), "data_count set to %d instead of 7\n", data_count );
+    /* Chinese, Japanese, and Korean editions of Windows 10 sometimes set data_count to a higher value */
+    ok( data_count == 7 || broken( data_count > 7 ), "data_count set to %d instead of 7\n", data_count );
     ok( type == REG_SZ, "type %d is not REG_SZ\n", type );
     /* v5.1.2600.0 (XP Home and Professional) does not touch value or data in this case */
     ok( !strcmp( value, "Te" ) || !strcmp( value, "xxxxxxxxxx" ), 
         "value set to '%s' instead of 'Te' or 'xxxxxxxxxx'\n", value );
-    ok( !strcmp( data, "foobar" ) || !strcmp( data, "xxxxxxx" ) || broken( !strcmp( data, "xxxxxxxx" ) && data_count == 8 ),
+    ok( !strcmp( data, "foobar" ) || !strcmp( data, "xxxxxxx" ) || broken( !strcmp( data, "xxxxxxxx" ) && data_count > 7 ),
         "data set to '%s' instead of 'foobar' or 'xxxxxxx'\n", data );
 
     /* overflow empty name */
@@ -565,11 +566,12 @@ static void test_enum_value(void)
     res = RegEnumValueA( test_key, 0, value, &val_count, NULL, &type, (LPBYTE)data, &data_count );
     ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %d\n", res );
     ok( val_count == 0, "val_count set to %d\n", val_count );
-    ok( data_count == 7 || broken( data_count == 8 ), "data_count set to %d instead of 7\n", data_count );
+    /* Chinese, Japanese, and Korean editions of Windows 10 sometimes set data_count to a higher value */
+    ok( data_count == 7 || broken( data_count > 7 ), "data_count set to %d instead of 7\n", data_count );
     ok( type == REG_SZ, "type %d is not REG_SZ\n", type );
     ok( !strcmp( value, "xxxxxxxxxx" ), "value set to '%s'\n", value );
     /* v5.1.2600.0 (XP Home and Professional) does not touch data in this case */
-    ok( !strcmp( data, "foobar" ) || !strcmp( data, "xxxxxxx" ) || broken( !strcmp( data, "xxxxxxxx" ) && data_count == 8 ),
+    ok( !strcmp( data, "foobar" ) || !strcmp( data, "xxxxxxx" ) || broken( !strcmp( data, "xxxxxxxx" ) && data_count > 7 ),
         "data set to '%s' instead of 'foobar' or 'xxxxxxx'\n", data );
 
     /* overflow data */




More information about the wine-cvs mailing list