From 9fde9be110eb5b76c6e67bfb08ba9fd83b3ce549 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Thu, 4 Jun 2015 22:36:52 +0200 Subject: [PATCH] ntdll-Directory_Test: Update patchset. --- ...t-call-lstrlenW-on-non-null-terminat.patch | 25 +++++++++++++ ...erly-mark-test-failures-with-todo_wi.patch | 37 ------------------- patches/patchinstall.sh | 4 +- 3 files changed, 27 insertions(+), 39 deletions(-) create mode 100644 patches/ntdll-Directory_Test/0001-ntdll-tests-Don-t-call-lstrlenW-on-non-null-terminat.patch delete mode 100644 patches/ntdll-Directory_Test/0001-ntdll-tests-Properly-mark-test-failures-with-todo_wi.patch diff --git a/patches/ntdll-Directory_Test/0001-ntdll-tests-Don-t-call-lstrlenW-on-non-null-terminat.patch b/patches/ntdll-Directory_Test/0001-ntdll-tests-Don-t-call-lstrlenW-on-non-null-terminat.patch new file mode 100644 index 00000000..cbaf223b --- /dev/null +++ b/patches/ntdll-Directory_Test/0001-ntdll-tests-Don-t-call-lstrlenW-on-non-null-terminat.patch @@ -0,0 +1,25 @@ +From 725ae5202ae6206606a330d3799fb620a09dc8f9 Mon Sep 17 00:00:00 2001 +From: Sebastian Lackner +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 + diff --git a/patches/ntdll-Directory_Test/0001-ntdll-tests-Properly-mark-test-failures-with-todo_wi.patch b/patches/ntdll-Directory_Test/0001-ntdll-tests-Properly-mark-test-failures-with-todo_wi.patch deleted file mode 100644 index f9596002..00000000 --- a/patches/ntdll-Directory_Test/0001-ntdll-tests-Properly-mark-test-failures-with-todo_wi.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 944a22dea9d1ea64e7872e9fd71df1c0dde0c3cc Mon Sep 17 00:00:00 2001 -From: Sebastian Lackner -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 - diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 2aa7d128..9d1f58e9 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -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