ntdll-Directory_Test: Update patchset.

This commit is contained in:
Sebastian Lackner 2015-06-04 22:36:52 +02:00
parent ee2f208b2b
commit 9fde9be110
3 changed files with 27 additions and 39 deletions

View File

@ -0,0 +1,25 @@
From 725ae5202ae6206606a330d3799fb620a09dc8f9 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Thu, 4 Jun 2015 16:12:58 +0200
Subject: ntdll/tests: Don't call lstrlenW on non-null-terminated buffer.
---
dlls/ntdll/tests/directory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/ntdll/tests/directory.c b/dlls/ntdll/tests/directory.c
index 21aa31f..730b0f1 100644
--- a/dlls/ntdll/tests/directory.c
+++ b/dlls/ntdll/tests/directory.c
@@ -350,7 +350,7 @@ static void test_NtQueryDirectoryFile_case(void)
}
mask.Buffer = testmask;
- mask.Length = mask.MaximumLength = lstrlenW(testmask) * sizeof(WCHAR);
+ mask.Length = mask.MaximumLength = sizeof(testmask);
pNtQueryDirectoryFile(dirh, NULL, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, TRUE, &mask, FALSE);
ok(U(io).Status == STATUS_SUCCESS, "failed to query directory; status %x\n", U(io).Status);
--
2.4.2

View File

@ -1,37 +0,0 @@
From 944a22dea9d1ea64e7872e9fd71df1c0dde0c3cc Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Wed, 3 Jun 2015 07:20:59 +0200
Subject: ntdll/tests: Properly mark test failures with todo_wine.
Note: Those test failures are not Wine Staging specific and also
present in upstream Wine.
---
dlls/ntdll/tests/directory.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/dlls/ntdll/tests/directory.c b/dlls/ntdll/tests/directory.c
index 21aa31f..5e1cf73 100644
--- a/dlls/ntdll/tests/directory.c
+++ b/dlls/ntdll/tests/directory.c
@@ -353,14 +353,18 @@ static void test_NtQueryDirectoryFile_case(void)
mask.Length = mask.MaximumLength = lstrlenW(testmask) * sizeof(WCHAR);
pNtQueryDirectoryFile(dirh, NULL, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, TRUE, &mask, FALSE);
+ todo_wine
ok(U(io).Status == STATUS_SUCCESS, "failed to query directory; status %x\n", U(io).Status);
data_len = io.Information;
+ todo_wine
ok(data_len >= sizeof(FILE_BOTH_DIRECTORY_INFORMATION), "not enough data in directory\n");
name = dir_info->FileName;
name_len = dir_info->FileNameLength / sizeof(WCHAR);
+ todo_wine
ok(name_len == testfile_len, "unexpected filename length %u\n", name_len);
+ todo_wine
ok(!memcmp(name, testfile_w, testfile_len * sizeof(WCHAR)), "unexpected filename %s\n",
wine_dbgstr_wn(name, name_len));
--
2.4.2

View File

@ -3558,9 +3558,9 @@ fi
# | * dlls/ntdll/tests/directory.c
# |
if test "$enable_ntdll_Directory_Test" -eq 1; then
patch_apply ntdll-Directory_Test/0001-ntdll-tests-Properly-mark-test-failures-with-todo_wi.patch
patch_apply ntdll-Directory_Test/0001-ntdll-tests-Don-t-call-lstrlenW-on-non-null-terminat.patch
(
echo '+ { "Sebastian Lackner", "ntdll/tests: Properly mark test failures with todo_wine.", 1 },';
echo '+ { "Sebastian Lackner", "ntdll/tests: Don'\''t call lstrlenW on non-null-terminated buffer.", 1 },';
) >> "$patchlist"
fi