Alexandre Julliard : ntdll/tests: Fix a test crash on latest Windows 10.

Alexandre Julliard julliard at winehq.org
Tue Dec 11 15:58:17 CST 2018


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Dec 11 15:55:34 2018 +0100

ntdll/tests: Fix a test crash on latest Windows 10.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ntdll/tests/directory.c | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/dlls/ntdll/tests/directory.c b/dlls/ntdll/tests/directory.c
index 2c6170b..a69b31b 100644
--- a/dlls/ntdll/tests/directory.c
+++ b/dlls/ntdll/tests/directory.c
@@ -563,13 +563,17 @@ static void test_NtQueryDirectoryFile(void)
     ok( U(io).Status == STATUS_BUFFER_OVERFLOW, "wrong status %x\n", U(io).Status );
     ok( U(io).Information == data_size || broken( U(io).Information == 0),
         "wrong info %lx\n", U(io).Information );
-    ok( fbdi->NextEntryOffset == 0, "wrong offset %x\n",  fbdi->NextEntryOffset );
-    ok( fbdi->FileNameLength == lstrlenW(testfiles[0].name) * sizeof(WCHAR),
-        "wrong length %x\n", fbdi->FileNameLength );
-    ok( filename[0] == testfiles[0].name[0], "incorrect long file name: %s\n",
-        wine_dbgstr_wn(fbdi->FileName, fbdi->FileNameLength/sizeof(WCHAR)));
-    ok( filename[1] == 0x5555, "incorrect long file name: %s\n",
-        wine_dbgstr_wn(fbdi->FileName, fbdi->FileNameLength/sizeof(WCHAR)));
+    ok( fbdi->NextEntryOffset == 0 || fbdi->NextEntryOffset == 0x55555555, /* win10 >= 1709 */
+        "wrong offset %x\n",  fbdi->NextEntryOffset );
+    if (!fbdi->NextEntryOffset)
+    {
+        ok( fbdi->FileNameLength == lstrlenW(testfiles[0].name) * sizeof(WCHAR),
+            "wrong length %x\n", fbdi->FileNameLength );
+        ok( filename[0] == testfiles[0].name[0], "incorrect long file name: %s\n",
+            wine_dbgstr_wn(fbdi->FileName, fbdi->FileNameLength/sizeof(WCHAR)));
+        ok( filename[1] == 0x5555, "incorrect long file name: %s\n",
+            wine_dbgstr_wn(fbdi->FileName, fbdi->FileNameLength/sizeof(WCHAR)));
+    }
 
     test_NtQueryDirectoryFile_classes( dirh, &mask );
 




More information about the wine-cvs mailing list