Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/ntdll/tests/om.c | 211 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 211 insertions(+)
diff --git a/dlls/ntdll/tests/om.c b/dlls/ntdll/tests/om.c index a0702a580b7..0fc53384a89 100644 --- a/dlls/ntdll/tests/om.c +++ b/dlls/ntdll/tests/om.c @@ -78,6 +78,16 @@ static NTSTATUS (WINAPI *pNtCompareObjects)(HANDLE,HANDLE); #define KEYEDEVENT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0x0003) #define DESKTOP_ALL_ACCESS 0x01ff
+#define check_unicode_string(a, b) check_unicode_string_(__LINE__, a, b) +static void check_unicode_string_( int line, const UNICODE_STRING *string, const WCHAR *expect ) +{ + size_t len = wcslen( expect ) * sizeof(WCHAR); + + ok_(__FILE__, line)( !wcscmp( string->Buffer, expect ), "got string %s\n", debugstr_w( string->Buffer )); + ok_(__FILE__, line)( string->Length == len, "got length %u\n", string->Length ); + ok_(__FILE__, line)( string->MaximumLength == len + sizeof(WCHAR), "got max length %u\n", string->MaximumLength ); +} + static void test_case_sensitive (void) { NTSTATUS status; @@ -2500,6 +2510,206 @@ static void test_object_identity(void) pNtClose( h1 ); }
+static void test_query_directory(void) +{ + static const DIRECTORY_BASIC_INFORMATION empty_info; + char buffer[200]; + DIRECTORY_BASIC_INFORMATION *info = (void *)buffer; + ULONG context, size, needed_size; + HANDLE dir, child1, child2; + OBJECT_ATTRIBUTES attr; + UNICODE_STRING string; + NTSTATUS status; + + RtlInitUnicodeString( &string, L"\BaseNamedObjects\winetest" ); + InitializeObjectAttributes( &attr, &string, 0, 0, NULL ); + status = NtCreateDirectoryObject( &dir, DIRECTORY_QUERY, &attr ); + ok( !status, "got %#lx\n", status ); + + context = 0xdeadbeef; + size = 0xdeadbeef; + status = NtQueryDirectoryObject( dir, info, 0, TRUE, TRUE, &context, &size ); + todo_wine ok( status == STATUS_NO_MORE_ENTRIES, "got %#lx\n", status ); + todo_wine ok( context == 0xdeadbeef, "got context %#lx\n", context ); + todo_wine ok( size == sizeof(*info) || broken(!size) /* WoW64 */, "got size %lu\n", size ); + + context = 0xdeadbeef; + size = 0xdeadbeef; + status = NtQueryDirectoryObject( dir, info, 0, FALSE, TRUE, &context, &size ); + todo_wine ok( status == STATUS_NO_MORE_ENTRIES, "got %#lx\n", status ); + todo_wine ok( context == 0xdeadbeef, "got context %#lx\n", context ); + todo_wine ok( size == sizeof(*info) || broken(!size) /* WoW64 */, "got size %lu\n", size ); + + context = 0xdeadbeef; + size = 0xdeadbeef; + memset( buffer, 0xcc, sizeof(buffer) ); + status = NtQueryDirectoryObject( dir, info, sizeof(buffer), TRUE, TRUE, &context, &size ); + ok( status == STATUS_NO_MORE_ENTRIES, "got %#lx\n", status ); + todo_wine ok( context == 0xdeadbeef, "got context %#lx\n", context ); + todo_wine ok( size == sizeof(*info) || broken(!size) /* WoW64 */, "got size %lu\n", size ); + if (size == sizeof(*info)) + ok( !memcmp( &info[0], &empty_info, sizeof(*info) ), "entry was not cleared\n" ); + + context = 0xdeadbeef; + size = 0xdeadbeef; + memset( buffer, 0xcc, sizeof(buffer) ); + status = NtQueryDirectoryObject( dir, info, sizeof(buffer), FALSE, TRUE, &context, &size ); + todo_wine ok( status == STATUS_NO_MORE_ENTRIES, "got %#lx\n", status ); + todo_wine ok( context == 0xdeadbeef, "got context %#lx\n", context ); + todo_wine ok( size == sizeof(*info) || broken(!size) /* WoW64 */, "got size %lu\n", size ); + if (size == sizeof(*info)) + ok( !memcmp( &info[0], &empty_info, sizeof(*info) ), "entry was not cleared\n" ); + + RtlInitUnicodeString( &string, L"\BaseNamedObjects\winetest\Telamon" ); + status = NtCreateMutant( &child1, GENERIC_ALL, &attr, FALSE ); + ok( !status, "got %#lx\n", status ); + + RtlInitUnicodeString( &string, L"\BaseNamedObjects\winetest\Oileus" ); + status = NtCreateMutant( &child2, GENERIC_ALL, &attr, FALSE ); + ok( !status, "got %#lx\n", status ); + + context = 0xdeadbeef; + size = 0xdeadbeef; + status = NtQueryDirectoryObject( NULL, info, sizeof(buffer), TRUE, TRUE, &context, &size ); + ok( status == STATUS_INVALID_HANDLE, "got %#lx\n", status ); + todo_wine ok( context == 0xdeadbeef, "got context %#lx\n", context ); + todo_wine ok( size == 0xdeadbeef, "got size %lu\n", size); + + size = 0xdeadbeef; + status = NtQueryDirectoryObject( dir, info, sizeof(buffer), TRUE, TRUE, NULL, &size ); + ok( status == STATUS_ACCESS_VIOLATION, "got %#lx\n", status ); + ok( size == 0xdeadbeef, "got size %lu\n", size); + + context = 0xdeadbeef; + size = 0xdeadbeef; + memset( buffer, 0xcc, sizeof(buffer) ); + status = NtQueryDirectoryObject( dir, info, sizeof(buffer), TRUE, TRUE, &context, &size ); + ok( !status, "got %#lx\n", status ); + ok( context == 1, "got context %#lx\n", context ); + ok( size && size < sizeof(buffer), "got size %lu\n", size ); + check_unicode_string( &info[0].ObjectName, L"Oileus" ); + check_unicode_string( &info[0].ObjectTypeName, L"Mutant" ); + todo_wine + ok( !memcmp( &info[1], &empty_info, sizeof(*info) ), "entry was not cleared\n" ); + + memset( buffer, 0xcc, sizeof(buffer) ); + status = NtQueryDirectoryObject( dir, info, sizeof(buffer), TRUE, FALSE, &context, &size ); + ok( !status, "got %#lx\n", status ); + ok( context == 2, "got context %#lx\n", context ); + check_unicode_string( &info[0].ObjectName, L"Telamon" ); + check_unicode_string( &info[0].ObjectTypeName, L"Mutant" ); + todo_wine ok( !memcmp( &info[1], &empty_info, sizeof(*info) ), "entry was not cleared\n" ); + + size = 0xdeadbeef; + status = NtQueryDirectoryObject( dir, info, sizeof(buffer), TRUE, FALSE, &context, &size ); + ok( status == STATUS_NO_MORE_ENTRIES, "got %#lx\n", status ); + ok( context == 2, "got context %#lx\n", context ); + todo_wine ok( size == sizeof(*info) || broken(!size) /* WoW64 */, "got size %lu\n", size ); + + memset( buffer, 0xcc, sizeof(buffer) ); + status = NtQueryDirectoryObject( dir, info, sizeof(buffer), TRUE, TRUE, &context, &size ); + ok( !status, "got %#lx\n", status ); + ok( context == 1, "got context %#lx\n", context ); + check_unicode_string( &info[0].ObjectName, L"Oileus" ); + check_unicode_string( &info[0].ObjectTypeName, L"Mutant" ); + todo_wine ok( !memcmp( &info[1], &empty_info, sizeof(*info) ), "entry was not cleared\n" ); + + needed_size = size; + + size = 0xdeadbeef; + context = 0xdeadbeef; + status = NtQueryDirectoryObject( dir, info, 0, TRUE, TRUE, &context, &size ); + todo_wine ok( status == STATUS_BUFFER_TOO_SMALL, "got %#lx\n", status ); + todo_wine ok( context == 0xdeadbeef, "got context %#lx\n", context ); + todo_wine ok( size == needed_size, "expected size %lu, got %lu\n", needed_size, size ); + + size = 0xdeadbeef; + memset( buffer, 0xcc, sizeof(buffer) ); + status = NtQueryDirectoryObject( dir, info, needed_size - 1, TRUE, TRUE, &context, &size ); + todo_wine ok( status == STATUS_BUFFER_TOO_SMALL, "got %#lx\n", status ); + todo_wine ok( size == needed_size, "expected size %lu, got %lu\n", needed_size, size ); + + status = NtQueryDirectoryObject( dir, info, sizeof(buffer), TRUE, TRUE, &context, NULL ); + ok( !status, "got %#lx\n", status ); + + context = 0; + memset( buffer, 0xcc, sizeof(buffer) ); + status = NtQueryDirectoryObject( dir, info, sizeof(buffer), TRUE, FALSE, &context, &size ); + ok( !status, "got %#lx\n", status ); + ok( context == 1, "got context %#lx\n", context ); + check_unicode_string( &info[0].ObjectName, L"Oileus" ); + check_unicode_string( &info[0].ObjectTypeName, L"Mutant" ); + todo_wine ok( !memcmp( &info[1], &empty_info, sizeof(*info) ), "entry was not cleared\n" ); + + memset( buffer, 0xcc, sizeof(buffer) ); + status = NtQueryDirectoryObject( dir, info, sizeof(buffer), FALSE, TRUE, &context, &size ); + todo_wine ok( !status, "got %#lx\n", status ); + if (!status) + { + ok( context == 2, "got context %#lx\n", context ); + check_unicode_string( &info[0].ObjectName, L"Oileus" ); + check_unicode_string( &info[0].ObjectTypeName, L"Mutant" ); + check_unicode_string( &info[1].ObjectName, L"Telamon" ); + check_unicode_string( &info[1].ObjectTypeName, L"Mutant" ); + ok( !memcmp( &info[2], &empty_info, sizeof(*info) ), "entry was not cleared\n" ); + } + + needed_size = size; + size = 0xdeadbeef; + context = 0xdeadbeef; + memset( buffer, 0xcc, sizeof(buffer) ); + status = NtQueryDirectoryObject( dir, info, needed_size - 1, FALSE, TRUE, &context, &size ); + todo_wine ok( status == STATUS_MORE_ENTRIES, "got %#lx\n", status ); + if (status == STATUS_MORE_ENTRIES) + { + ok( context == 1, "got context %#lx\n", context ); + ok( size > 0 && size < needed_size, "got size %lu\n", size ); + check_unicode_string( &info[0].ObjectName, L"Oileus" ); + check_unicode_string( &info[0].ObjectTypeName, L"Mutant" ); + ok( !memcmp( &info[1], &empty_info, sizeof(*info) ), "entry was not cleared\n" ); + } + + size = 0xdeadbeef; + context = 0xdeadbeef; + memset( buffer, 0xcc, sizeof(buffer) ); + status = NtQueryDirectoryObject( dir, info, sizeof(*info), FALSE, TRUE, &context, &size ); + todo_wine ok( status == STATUS_MORE_ENTRIES + || broken(status == STATUS_BUFFER_TOO_SMALL) /* wow64 */, "got %#lx\n", status ); + if (status == STATUS_MORE_ENTRIES) + { + ok( !context, "got context %#lx\n", context ); + ok( size == sizeof(*info), "got size %lu\n", size ); + ok( !memcmp( &info[0], &empty_info, sizeof(*info) ), "entry was not cleared\n" ); + } + + size = 0xdeadbeef; + context = 0xdeadbeef; + status = NtQueryDirectoryObject( dir, info, 0, FALSE, TRUE, &context, &size ); + todo_wine ok( status == STATUS_MORE_ENTRIES + || broken(status == STATUS_BUFFER_TOO_SMALL) /* wow64 */, "got %#lx\n", status ); + if (status == STATUS_MORE_ENTRIES) + { + ok( !context, "got context %#lx\n", context ); + ok( size == sizeof(*info), "got size %lu\n", size ); + } + + context = 1; + memset( buffer, 0xcc, sizeof(buffer) ); + status = NtQueryDirectoryObject( dir, info, sizeof(buffer), FALSE, FALSE, &context, &size ); + todo_wine ok( !status, "got %#lx\n", status ); + if (!status) + { + ok( context == 2, "got context %#lx\n", context ); + check_unicode_string( &info[0].ObjectName, L"Telamon" ); + check_unicode_string( &info[0].ObjectTypeName, L"Mutant" ); + ok( !memcmp( &info[1], &empty_info, sizeof(*info) ), "entry was not cleared\n" ); + } + + NtClose( child1 ); + NtClose( child2 ); + NtClose( dir ); +} + START_TEST(om) { HMODULE hntdll = GetModuleHandleA("ntdll.dll"); @@ -2561,4 +2771,5 @@ START_TEST(om) test_get_next_thread(); test_globalroot(); test_object_identity(); + test_query_directory(); }
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/ntdll/tests/om.c | 12 ++++++------ dlls/ntdll/unix/sync.c | 7 +++---- 2 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/dlls/ntdll/tests/om.c b/dlls/ntdll/tests/om.c index 0fc53384a89..fa5e9624025 100644 --- a/dlls/ntdll/tests/om.c +++ b/dlls/ntdll/tests/om.c @@ -2530,14 +2530,14 @@ static void test_query_directory(void) size = 0xdeadbeef; status = NtQueryDirectoryObject( dir, info, 0, TRUE, TRUE, &context, &size ); todo_wine ok( status == STATUS_NO_MORE_ENTRIES, "got %#lx\n", status ); - todo_wine ok( context == 0xdeadbeef, "got context %#lx\n", context ); + ok( context == 0xdeadbeef, "got context %#lx\n", context ); todo_wine ok( size == sizeof(*info) || broken(!size) /* WoW64 */, "got size %lu\n", size );
context = 0xdeadbeef; size = 0xdeadbeef; status = NtQueryDirectoryObject( dir, info, 0, FALSE, TRUE, &context, &size ); todo_wine ok( status == STATUS_NO_MORE_ENTRIES, "got %#lx\n", status ); - todo_wine ok( context == 0xdeadbeef, "got context %#lx\n", context ); + ok( context == 0xdeadbeef, "got context %#lx\n", context ); todo_wine ok( size == sizeof(*info) || broken(!size) /* WoW64 */, "got size %lu\n", size );
context = 0xdeadbeef; @@ -2545,7 +2545,7 @@ static void test_query_directory(void) memset( buffer, 0xcc, sizeof(buffer) ); status = NtQueryDirectoryObject( dir, info, sizeof(buffer), TRUE, TRUE, &context, &size ); ok( status == STATUS_NO_MORE_ENTRIES, "got %#lx\n", status ); - todo_wine ok( context == 0xdeadbeef, "got context %#lx\n", context ); + ok( context == 0xdeadbeef, "got context %#lx\n", context ); todo_wine ok( size == sizeof(*info) || broken(!size) /* WoW64 */, "got size %lu\n", size ); if (size == sizeof(*info)) ok( !memcmp( &info[0], &empty_info, sizeof(*info) ), "entry was not cleared\n" ); @@ -2555,7 +2555,7 @@ static void test_query_directory(void) memset( buffer, 0xcc, sizeof(buffer) ); status = NtQueryDirectoryObject( dir, info, sizeof(buffer), FALSE, TRUE, &context, &size ); todo_wine ok( status == STATUS_NO_MORE_ENTRIES, "got %#lx\n", status ); - todo_wine ok( context == 0xdeadbeef, "got context %#lx\n", context ); + ok( context == 0xdeadbeef, "got context %#lx\n", context ); todo_wine ok( size == sizeof(*info) || broken(!size) /* WoW64 */, "got size %lu\n", size ); if (size == sizeof(*info)) ok( !memcmp( &info[0], &empty_info, sizeof(*info) ), "entry was not cleared\n" ); @@ -2572,7 +2572,7 @@ static void test_query_directory(void) size = 0xdeadbeef; status = NtQueryDirectoryObject( NULL, info, sizeof(buffer), TRUE, TRUE, &context, &size ); ok( status == STATUS_INVALID_HANDLE, "got %#lx\n", status ); - todo_wine ok( context == 0xdeadbeef, "got context %#lx\n", context ); + ok( context == 0xdeadbeef, "got context %#lx\n", context ); todo_wine ok( size == 0xdeadbeef, "got size %lu\n", size);
size = 0xdeadbeef; @@ -2620,7 +2620,7 @@ static void test_query_directory(void) context = 0xdeadbeef; status = NtQueryDirectoryObject( dir, info, 0, TRUE, TRUE, &context, &size ); todo_wine ok( status == STATUS_BUFFER_TOO_SMALL, "got %#lx\n", status ); - todo_wine ok( context == 0xdeadbeef, "got context %#lx\n", context ); + ok( context == 0xdeadbeef, "got context %#lx\n", context ); todo_wine ok( size == needed_size, "expected size %lu, got %lu\n", needed_size, size );
size = 0xdeadbeef; diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c index 0786454dad2..373afd69b2b 100644 --- a/dlls/ntdll/unix/sync.c +++ b/dlls/ntdll/unix/sync.c @@ -1099,10 +1099,9 @@ NTSTATUS WINAPI NtQueryDirectoryObject( HANDLE handle, DIRECTORY_BASIC_INFORMATI ULONG size, BOOLEAN single_entry, BOOLEAN restart, ULONG *context, ULONG *ret_size ) { + ULONG index = restart ? 0 : *context; NTSTATUS ret;
- if (restart) *context = 0; - if (single_entry) { if (size <= sizeof(*buffer) + 2 * sizeof(WCHAR)) return STATUS_BUFFER_OVERFLOW; @@ -1110,7 +1109,7 @@ NTSTATUS WINAPI NtQueryDirectoryObject( HANDLE handle, DIRECTORY_BASIC_INFORMATI SERVER_START_REQ( get_directory_entry ) { req->handle = wine_server_obj_handle( handle ); - req->index = *context; + req->index = index; wine_server_set_reply( req, buffer + 1, size - sizeof(*buffer) - 2*sizeof(WCHAR) ); if (!(ret = wine_server_call( req ))) { @@ -1125,7 +1124,7 @@ NTSTATUS WINAPI NtQueryDirectoryObject( HANDLE handle, DIRECTORY_BASIC_INFORMATI buffer->ObjectTypeName.Length ); buffer->ObjectName.Buffer[buffer->ObjectName.Length/sizeof(WCHAR)] = 0; buffer->ObjectTypeName.Buffer[buffer->ObjectTypeName.Length/sizeof(WCHAR)] = 0; - (*context)++; + *context = index + 1; } } SERVER_END_REQ;
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=112280
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
ntdll: om.c:2590: Test failed: got string L"Telamon" om.c:2590: Test failed: got length 14 om.c:2590: Test failed: got max length 16 om.c:2599: Test failed: got string L"Oileus" om.c:2599: Test failed: got length 12 om.c:2599: Test failed: got max length 14 om.c:2613: Test failed: got string L"Telamon" om.c:2613: Test failed: got length 14 om.c:2613: Test failed: got max length 16 om.c:2640: Test failed: got string L"Telamon" om.c:2640: Test failed: got length 14 om.c:2640: Test failed: got max length 16 om.c:2650: Test failed: got string L"Telamon" om.c:2650: Test failed: got length 14 om.c:2650: Test failed: got max length 16 om.c:2652: Test failed: got string L"Oileus" om.c:2652: Test failed: got length 12 om.c:2652: Test failed: got max length 14 om.c:2667: Test failed: got string L"Telamon" om.c:2667: Test failed: got length 14 om.c:2667: Test failed: got max length 16 om.c:2703: Test failed: got string L"Oileus" om.c:2703: Test failed: got length 12 om.c:2703: Test failed: got max length 14
=== w7u_adm (32 bit report) ===
ntdll: om.c:2590: Test failed: got string L"Telamon" om.c:2590: Test failed: got length 14 om.c:2590: Test failed: got max length 16 om.c:2599: Test failed: got string L"Oileus" om.c:2599: Test failed: got length 12 om.c:2599: Test failed: got max length 14 om.c:2613: Test failed: got string L"Telamon" om.c:2613: Test failed: got length 14 om.c:2613: Test failed: got max length 16 om.c:2640: Test failed: got string L"Telamon" om.c:2640: Test failed: got length 14 om.c:2640: Test failed: got max length 16 om.c:2650: Test failed: got string L"Telamon" om.c:2650: Test failed: got length 14 om.c:2650: Test failed: got max length 16 om.c:2652: Test failed: got string L"Oileus" om.c:2652: Test failed: got length 12 om.c:2652: Test failed: got max length 14 om.c:2667: Test failed: got string L"Telamon" om.c:2667: Test failed: got length 14 om.c:2667: Test failed: got max length 16 om.c:2703: Test failed: got string L"Oileus" om.c:2703: Test failed: got length 12 om.c:2703: Test failed: got max length 14
=== w7u_el (32 bit report) ===
ntdll: om.c:2590: Test failed: got string L"Telamon" om.c:2590: Test failed: got length 14 om.c:2590: Test failed: got max length 16 om.c:2599: Test failed: got string L"Oileus" om.c:2599: Test failed: got length 12 om.c:2599: Test failed: got max length 14 om.c:2613: Test failed: got string L"Telamon" om.c:2613: Test failed: got length 14 om.c:2613: Test failed: got max length 16 om.c:2640: Test failed: got string L"Telamon" om.c:2640: Test failed: got length 14 om.c:2640: Test failed: got max length 16 om.c:2650: Test failed: got string L"Telamon" om.c:2650: Test failed: got length 14 om.c:2650: Test failed: got max length 16 om.c:2652: Test failed: got string L"Oileus" om.c:2652: Test failed: got length 12 om.c:2652: Test failed: got max length 14 om.c:2667: Test failed: got string L"Telamon" om.c:2667: Test failed: got length 14 om.c:2667: Test failed: got max length 16 om.c:2703: Test failed: got string L"Oileus" om.c:2703: Test failed: got length 12 om.c:2703: Test failed: got max length 14
=== w8 (32 bit report) ===
ntdll: om.c:2590: Test failed: got string L"Telamon" om.c:2590: Test failed: got length 14 om.c:2590: Test failed: got max length 16 om.c:2599: Test failed: got string L"Oileus" om.c:2599: Test failed: got length 12 om.c:2599: Test failed: got max length 14 om.c:2613: Test failed: got string L"Telamon" om.c:2613: Test failed: got length 14 om.c:2613: Test failed: got max length 16 om.c:2640: Test failed: got string L"Telamon" om.c:2640: Test failed: got length 14 om.c:2640: Test failed: got max length 16 om.c:2650: Test failed: got string L"Telamon" om.c:2650: Test failed: got length 14 om.c:2650: Test failed: got max length 16 om.c:2652: Test failed: got string L"Oileus" om.c:2652: Test failed: got length 12 om.c:2652: Test failed: got max length 14 om.c:2667: Test failed: got string L"Telamon" om.c:2667: Test failed: got length 14 om.c:2667: Test failed: got max length 16 om.c:2703: Test failed: got string L"Oileus" om.c:2703: Test failed: got length 12 om.c:2703: Test failed: got max length 14
=== w8adm (32 bit report) ===
ntdll: om.c:2590: Test failed: got string L"Telamon" om.c:2590: Test failed: got length 14 om.c:2590: Test failed: got max length 16 om.c:2599: Test failed: got string L"Oileus" om.c:2599: Test failed: got length 12 om.c:2599: Test failed: got max length 14 om.c:2613: Test failed: got string L"Telamon" om.c:2613: Test failed: got length 14 om.c:2613: Test failed: got max length 16 om.c:2640: Test failed: got string L"Telamon" om.c:2640: Test failed: got length 14 om.c:2640: Test failed: got max length 16 om.c:2650: Test failed: got string L"Telamon" om.c:2650: Test failed: got length 14 om.c:2650: Test failed: got max length 16 om.c:2652: Test failed: got string L"Oileus" om.c:2652: Test failed: got length 12 om.c:2652: Test failed: got max length 14 om.c:2667: Test failed: got string L"Telamon" om.c:2667: Test failed: got length 14 om.c:2667: Test failed: got max length 16 om.c:2703: Test failed: got string L"Oileus" om.c:2703: Test failed: got length 12 om.c:2703: Test failed: got max length 14
=== w864 (32 bit report) ===
ntdll: om.c:2576: Test failed: got size 0
=== w1064v1507 (32 bit report) ===
ntdll: om.c:2576: Test failed: got size 0
=== w1064v1809 (32 bit report) ===
ntdll: om.c:2576: Test failed: got size 0
=== w1064 (32 bit report) ===
ntdll: om.c:2576: Test failed: got size 0
=== w1064_tsign (32 bit report) ===
ntdll: om.c:2576: Test failed: got size 0
=== w10pro64 (32 bit report) ===
ntdll: om.c:2576: Test failed: got size 0
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/ntdll/tests/om.c | 2 +- dlls/ntdll/unix/sync.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/ntdll/tests/om.c b/dlls/ntdll/tests/om.c index fa5e9624025..4733cd144ee 100644 --- a/dlls/ntdll/tests/om.c +++ b/dlls/ntdll/tests/om.c @@ -2573,7 +2573,7 @@ static void test_query_directory(void) status = NtQueryDirectoryObject( NULL, info, sizeof(buffer), TRUE, TRUE, &context, &size ); ok( status == STATUS_INVALID_HANDLE, "got %#lx\n", status ); ok( context == 0xdeadbeef, "got context %#lx\n", context ); - todo_wine ok( size == 0xdeadbeef, "got size %lu\n", size); + ok( size == 0xdeadbeef, "got size %lu\n", size);
size = 0xdeadbeef; status = NtQueryDirectoryObject( dir, info, sizeof(buffer), TRUE, TRUE, NULL, &size ); diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c index 373afd69b2b..e1cc2d818b4 100644 --- a/dlls/ntdll/unix/sync.c +++ b/dlls/ntdll/unix/sync.c @@ -1125,11 +1125,12 @@ NTSTATUS WINAPI NtQueryDirectoryObject( HANDLE handle, DIRECTORY_BASIC_INFORMATI buffer->ObjectName.Buffer[buffer->ObjectName.Length/sizeof(WCHAR)] = 0; buffer->ObjectTypeName.Buffer[buffer->ObjectTypeName.Length/sizeof(WCHAR)] = 0; *context = index + 1; + + if (ret_size) + *ret_size = buffer->ObjectName.MaximumLength + buffer->ObjectTypeName.MaximumLength + sizeof(*buffer); } } SERVER_END_REQ; - if (ret_size) - *ret_size = buffer->ObjectName.MaximumLength + buffer->ObjectTypeName.MaximumLength + sizeof(*buffer); } else {
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=112281
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
ntdll: om.c:2590: Test failed: got string L"Telamon" om.c:2590: Test failed: got length 14 om.c:2590: Test failed: got max length 16 om.c:2599: Test failed: got string L"Oileus" om.c:2599: Test failed: got length 12 om.c:2599: Test failed: got max length 14 om.c:2613: Test failed: got string L"Telamon" om.c:2613: Test failed: got length 14 om.c:2613: Test failed: got max length 16 om.c:2640: Test failed: got string L"Telamon" om.c:2640: Test failed: got length 14 om.c:2640: Test failed: got max length 16 om.c:2650: Test failed: got string L"Telamon" om.c:2650: Test failed: got length 14 om.c:2650: Test failed: got max length 16 om.c:2652: Test failed: got string L"Oileus" om.c:2652: Test failed: got length 12 om.c:2652: Test failed: got max length 14 om.c:2667: Test failed: got string L"Telamon" om.c:2667: Test failed: got length 14 om.c:2667: Test failed: got max length 16 om.c:2703: Test failed: got string L"Oileus" om.c:2703: Test failed: got length 12 om.c:2703: Test failed: got max length 14
=== w7u_adm (32 bit report) ===
ntdll: om.c:2590: Test failed: got string L"Telamon" om.c:2590: Test failed: got length 14 om.c:2590: Test failed: got max length 16 om.c:2599: Test failed: got string L"Oileus" om.c:2599: Test failed: got length 12 om.c:2599: Test failed: got max length 14 om.c:2613: Test failed: got string L"Telamon" om.c:2613: Test failed: got length 14 om.c:2613: Test failed: got max length 16 om.c:2640: Test failed: got string L"Telamon" om.c:2640: Test failed: got length 14 om.c:2640: Test failed: got max length 16 om.c:2650: Test failed: got string L"Telamon" om.c:2650: Test failed: got length 14 om.c:2650: Test failed: got max length 16 om.c:2652: Test failed: got string L"Oileus" om.c:2652: Test failed: got length 12 om.c:2652: Test failed: got max length 14 om.c:2667: Test failed: got string L"Telamon" om.c:2667: Test failed: got length 14 om.c:2667: Test failed: got max length 16 om.c:2703: Test failed: got string L"Oileus" om.c:2703: Test failed: got length 12 om.c:2703: Test failed: got max length 14
=== w7u_el (32 bit report) ===
ntdll: om.c:2590: Test failed: got string L"Telamon" om.c:2590: Test failed: got length 14 om.c:2590: Test failed: got max length 16 om.c:2599: Test failed: got string L"Oileus" om.c:2599: Test failed: got length 12 om.c:2599: Test failed: got max length 14 om.c:2613: Test failed: got string L"Telamon" om.c:2613: Test failed: got length 14 om.c:2613: Test failed: got max length 16 om.c:2640: Test failed: got string L"Telamon" om.c:2640: Test failed: got length 14 om.c:2640: Test failed: got max length 16 om.c:2650: Test failed: got string L"Telamon" om.c:2650: Test failed: got length 14 om.c:2650: Test failed: got max length 16 om.c:2652: Test failed: got string L"Oileus" om.c:2652: Test failed: got length 12 om.c:2652: Test failed: got max length 14 om.c:2667: Test failed: got string L"Telamon" om.c:2667: Test failed: got length 14 om.c:2667: Test failed: got max length 16 om.c:2703: Test failed: got string L"Oileus" om.c:2703: Test failed: got length 12 om.c:2703: Test failed: got max length 14
=== w8 (32 bit report) ===
ntdll: om.c:2590: Test failed: got string L"Telamon" om.c:2590: Test failed: got length 14 om.c:2590: Test failed: got max length 16 om.c:2599: Test failed: got string L"Oileus" om.c:2599: Test failed: got length 12 om.c:2599: Test failed: got max length 14 om.c:2613: Test failed: got string L"Telamon" om.c:2613: Test failed: got length 14 om.c:2613: Test failed: got max length 16 om.c:2640: Test failed: got string L"Telamon" om.c:2640: Test failed: got length 14 om.c:2640: Test failed: got max length 16 om.c:2650: Test failed: got string L"Telamon" om.c:2650: Test failed: got length 14 om.c:2650: Test failed: got max length 16 om.c:2652: Test failed: got string L"Oileus" om.c:2652: Test failed: got length 12 om.c:2652: Test failed: got max length 14 om.c:2667: Test failed: got string L"Telamon" om.c:2667: Test failed: got length 14 om.c:2667: Test failed: got max length 16 om.c:2703: Test failed: got string L"Oileus" om.c:2703: Test failed: got length 12 om.c:2703: Test failed: got max length 14
=== w8adm (32 bit report) ===
ntdll: om.c:2590: Test failed: got string L"Telamon" om.c:2590: Test failed: got length 14 om.c:2590: Test failed: got max length 16 om.c:2599: Test failed: got string L"Oileus" om.c:2599: Test failed: got length 12 om.c:2599: Test failed: got max length 14 om.c:2613: Test failed: got string L"Telamon" om.c:2613: Test failed: got length 14 om.c:2613: Test failed: got max length 16 om.c:2640: Test failed: got string L"Telamon" om.c:2640: Test failed: got length 14 om.c:2640: Test failed: got max length 16 om.c:2650: Test failed: got string L"Telamon" om.c:2650: Test failed: got length 14 om.c:2650: Test failed: got max length 16 om.c:2652: Test failed: got string L"Oileus" om.c:2652: Test failed: got length 12 om.c:2652: Test failed: got max length 14 om.c:2667: Test failed: got string L"Telamon" om.c:2667: Test failed: got length 14 om.c:2667: Test failed: got max length 16 om.c:2703: Test failed: got string L"Oileus" om.c:2703: Test failed: got length 12 om.c:2703: Test failed: got max length 14
=== w864 (32 bit report) ===
ntdll: om.c:2576: Test failed: got size 0
=== w1064v1507 (32 bit report) ===
ntdll: om.c:2576: Test failed: got size 0
=== w1064v1809 (32 bit report) ===
ntdll: om.c:2576: Test failed: got size 0
=== w1064 (32 bit report) ===
ntdll: om.c:2576: Test failed: got size 0
=== w1064_tsign (32 bit report) ===
ntdll: om.c:2576: Test failed: got size 0
=== w10pro64 (32 bit report) ===
ntdll: om.c:2576: Test failed: got size 0
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/ntdll/tests/om.c | 2 +- server/directory.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/tests/om.c b/dlls/ntdll/tests/om.c index 4733cd144ee..2ff2a7fc706 100644 --- a/dlls/ntdll/tests/om.c +++ b/dlls/ntdll/tests/om.c @@ -2626,7 +2626,7 @@ static void test_query_directory(void) size = 0xdeadbeef; memset( buffer, 0xcc, sizeof(buffer) ); status = NtQueryDirectoryObject( dir, info, needed_size - 1, TRUE, TRUE, &context, &size ); - todo_wine ok( status == STATUS_BUFFER_TOO_SMALL, "got %#lx\n", status ); + ok( status == STATUS_BUFFER_TOO_SMALL, "got %#lx\n", status ); todo_wine ok( size == needed_size, "expected size %lu, got %lu\n", needed_size, size );
status = NtQueryDirectoryObject( dir, info, sizeof(buffer), TRUE, TRUE, &context, NULL ); diff --git a/server/directory.c b/server/directory.c index 2cd61be0838..caaf8c43d33 100644 --- a/server/directory.c +++ b/server/directory.c @@ -556,7 +556,7 @@ DECL_HANDLER(get_directory_entry) memcpy( (char *)ptr + name_len, type_name->str, type_name->len ); } } - else set_error( STATUS_BUFFER_OVERFLOW ); + else set_error( STATUS_BUFFER_TOO_SMALL );
release_object( obj ); }
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=112282
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
ntdll: om.c:2590: Test failed: got string L"Telamon" om.c:2590: Test failed: got length 14 om.c:2590: Test failed: got max length 16 om.c:2599: Test failed: got string L"Oileus" om.c:2599: Test failed: got length 12 om.c:2599: Test failed: got max length 14 om.c:2613: Test failed: got string L"Telamon" om.c:2613: Test failed: got length 14 om.c:2613: Test failed: got max length 16 om.c:2640: Test failed: got string L"Telamon" om.c:2640: Test failed: got length 14 om.c:2640: Test failed: got max length 16 om.c:2650: Test failed: got string L"Telamon" om.c:2650: Test failed: got length 14 om.c:2650: Test failed: got max length 16 om.c:2652: Test failed: got string L"Oileus" om.c:2652: Test failed: got length 12 om.c:2652: Test failed: got max length 14 om.c:2667: Test failed: got string L"Telamon" om.c:2667: Test failed: got length 14 om.c:2667: Test failed: got max length 16 om.c:2703: Test failed: got string L"Oileus" om.c:2703: Test failed: got length 12 om.c:2703: Test failed: got max length 14
=== w7u_adm (32 bit report) ===
ntdll: om.c:2590: Test failed: got string L"Telamon" om.c:2590: Test failed: got length 14 om.c:2590: Test failed: got max length 16 om.c:2599: Test failed: got string L"Oileus" om.c:2599: Test failed: got length 12 om.c:2599: Test failed: got max length 14 om.c:2613: Test failed: got string L"Telamon" om.c:2613: Test failed: got length 14 om.c:2613: Test failed: got max length 16 om.c:2640: Test failed: got string L"Telamon" om.c:2640: Test failed: got length 14 om.c:2640: Test failed: got max length 16 om.c:2650: Test failed: got string L"Telamon" om.c:2650: Test failed: got length 14 om.c:2650: Test failed: got max length 16 om.c:2652: Test failed: got string L"Oileus" om.c:2652: Test failed: got length 12 om.c:2652: Test failed: got max length 14 om.c:2667: Test failed: got string L"Telamon" om.c:2667: Test failed: got length 14 om.c:2667: Test failed: got max length 16 om.c:2703: Test failed: got string L"Oileus" om.c:2703: Test failed: got length 12 om.c:2703: Test failed: got max length 14
=== w7u_el (32 bit report) ===
ntdll: om.c:2590: Test failed: got string L"Telamon" om.c:2590: Test failed: got length 14 om.c:2590: Test failed: got max length 16 om.c:2599: Test failed: got string L"Oileus" om.c:2599: Test failed: got length 12 om.c:2599: Test failed: got max length 14 om.c:2613: Test failed: got string L"Telamon" om.c:2613: Test failed: got length 14 om.c:2613: Test failed: got max length 16 om.c:2640: Test failed: got string L"Telamon" om.c:2640: Test failed: got length 14 om.c:2640: Test failed: got max length 16 om.c:2650: Test failed: got string L"Telamon" om.c:2650: Test failed: got length 14 om.c:2650: Test failed: got max length 16 om.c:2652: Test failed: got string L"Oileus" om.c:2652: Test failed: got length 12 om.c:2652: Test failed: got max length 14 om.c:2667: Test failed: got string L"Telamon" om.c:2667: Test failed: got length 14 om.c:2667: Test failed: got max length 16 om.c:2703: Test failed: got string L"Oileus" om.c:2703: Test failed: got length 12 om.c:2703: Test failed: got max length 14
=== w8 (32 bit report) ===
ntdll: om.c:2590: Test failed: got string L"Telamon" om.c:2590: Test failed: got length 14 om.c:2590: Test failed: got max length 16 om.c:2599: Test failed: got string L"Oileus" om.c:2599: Test failed: got length 12 om.c:2599: Test failed: got max length 14 om.c:2613: Test failed: got string L"Telamon" om.c:2613: Test failed: got length 14 om.c:2613: Test failed: got max length 16 om.c:2640: Test failed: got string L"Telamon" om.c:2640: Test failed: got length 14 om.c:2640: Test failed: got max length 16 om.c:2650: Test failed: got string L"Telamon" om.c:2650: Test failed: got length 14 om.c:2650: Test failed: got max length 16 om.c:2652: Test failed: got string L"Oileus" om.c:2652: Test failed: got length 12 om.c:2652: Test failed: got max length 14 om.c:2667: Test failed: got string L"Telamon" om.c:2667: Test failed: got length 14 om.c:2667: Test failed: got max length 16 om.c:2703: Test failed: got string L"Oileus" om.c:2703: Test failed: got length 12 om.c:2703: Test failed: got max length 14
=== w8adm (32 bit report) ===
ntdll: om.c:2590: Test failed: got string L"Telamon" om.c:2590: Test failed: got length 14 om.c:2590: Test failed: got max length 16 om.c:2599: Test failed: got string L"Oileus" om.c:2599: Test failed: got length 12 om.c:2599: Test failed: got max length 14 om.c:2613: Test failed: got string L"Telamon" om.c:2613: Test failed: got length 14 om.c:2613: Test failed: got max length 16 om.c:2640: Test failed: got string L"Telamon" om.c:2640: Test failed: got length 14 om.c:2640: Test failed: got max length 16 om.c:2650: Test failed: got string L"Telamon" om.c:2650: Test failed: got length 14 om.c:2650: Test failed: got max length 16 om.c:2652: Test failed: got string L"Oileus" om.c:2652: Test failed: got length 12 om.c:2652: Test failed: got max length 14 om.c:2667: Test failed: got string L"Telamon" om.c:2667: Test failed: got length 14 om.c:2667: Test failed: got max length 16 om.c:2703: Test failed: got string L"Oileus" om.c:2703: Test failed: got length 12 om.c:2703: Test failed: got max length 14
=== w864 (32 bit report) ===
ntdll: om.c:2576: Test failed: got size 0
=== w1064v1507 (32 bit report) ===
ntdll: om.c:2576: Test failed: got size 0
=== w1064v1809 (32 bit report) ===
ntdll: om.c:2576: Test failed: got size 0
=== w1064 (32 bit report) ===
ntdll: om.c:2576: Test failed: got size 0
=== w1064_tsign (32 bit report) ===
ntdll: om.c:2576: Test failed: got size 0
=== w10pro64 (32 bit report) ===
ntdll: om.c:2576: Test failed: got size 0
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=112279
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
ntdll: om.c:2590: Test failed: got string L"Telamon" om.c:2590: Test failed: got length 14 om.c:2590: Test failed: got max length 16 om.c:2599: Test failed: got string L"Oileus" om.c:2599: Test failed: got length 12 om.c:2599: Test failed: got max length 14 om.c:2613: Test failed: got string L"Telamon" om.c:2613: Test failed: got length 14 om.c:2613: Test failed: got max length 16 om.c:2640: Test failed: got string L"Telamon" om.c:2640: Test failed: got length 14 om.c:2640: Test failed: got max length 16 om.c:2650: Test failed: got string L"Telamon" om.c:2650: Test failed: got length 14 om.c:2650: Test failed: got max length 16 om.c:2652: Test failed: got string L"Oileus" om.c:2652: Test failed: got length 12 om.c:2652: Test failed: got max length 14 om.c:2667: Test failed: got string L"Telamon" om.c:2667: Test failed: got length 14 om.c:2667: Test failed: got max length 16 om.c:2703: Test failed: got string L"Oileus" om.c:2703: Test failed: got length 12 om.c:2703: Test failed: got max length 14
=== w7u_adm (32 bit report) ===
ntdll: om.c:2590: Test failed: got string L"Telamon" om.c:2590: Test failed: got length 14 om.c:2590: Test failed: got max length 16 om.c:2599: Test failed: got string L"Oileus" om.c:2599: Test failed: got length 12 om.c:2599: Test failed: got max length 14 om.c:2613: Test failed: got string L"Telamon" om.c:2613: Test failed: got length 14 om.c:2613: Test failed: got max length 16 om.c:2640: Test failed: got string L"Telamon" om.c:2640: Test failed: got length 14 om.c:2640: Test failed: got max length 16 om.c:2650: Test failed: got string L"Telamon" om.c:2650: Test failed: got length 14 om.c:2650: Test failed: got max length 16 om.c:2652: Test failed: got string L"Oileus" om.c:2652: Test failed: got length 12 om.c:2652: Test failed: got max length 14 om.c:2667: Test failed: got string L"Telamon" om.c:2667: Test failed: got length 14 om.c:2667: Test failed: got max length 16 om.c:2703: Test failed: got string L"Oileus" om.c:2703: Test failed: got length 12 om.c:2703: Test failed: got max length 14
=== w7u_el (32 bit report) ===
ntdll: om.c:2590: Test failed: got string L"Telamon" om.c:2590: Test failed: got length 14 om.c:2590: Test failed: got max length 16 om.c:2599: Test failed: got string L"Oileus" om.c:2599: Test failed: got length 12 om.c:2599: Test failed: got max length 14 om.c:2613: Test failed: got string L"Telamon" om.c:2613: Test failed: got length 14 om.c:2613: Test failed: got max length 16 om.c:2640: Test failed: got string L"Telamon" om.c:2640: Test failed: got length 14 om.c:2640: Test failed: got max length 16 om.c:2650: Test failed: got string L"Telamon" om.c:2650: Test failed: got length 14 om.c:2650: Test failed: got max length 16 om.c:2652: Test failed: got string L"Oileus" om.c:2652: Test failed: got length 12 om.c:2652: Test failed: got max length 14 om.c:2667: Test failed: got string L"Telamon" om.c:2667: Test failed: got length 14 om.c:2667: Test failed: got max length 16 om.c:2703: Test failed: got string L"Oileus" om.c:2703: Test failed: got length 12 om.c:2703: Test failed: got max length 14
=== w8 (32 bit report) ===
ntdll: om.c:2590: Test failed: got string L"Telamon" om.c:2590: Test failed: got length 14 om.c:2590: Test failed: got max length 16 om.c:2599: Test failed: got string L"Oileus" om.c:2599: Test failed: got length 12 om.c:2599: Test failed: got max length 14 om.c:2613: Test failed: got string L"Telamon" om.c:2613: Test failed: got length 14 om.c:2613: Test failed: got max length 16 om.c:2640: Test failed: got string L"Telamon" om.c:2640: Test failed: got length 14 om.c:2640: Test failed: got max length 16 om.c:2650: Test failed: got string L"Telamon" om.c:2650: Test failed: got length 14 om.c:2650: Test failed: got max length 16 om.c:2652: Test failed: got string L"Oileus" om.c:2652: Test failed: got length 12 om.c:2652: Test failed: got max length 14 om.c:2667: Test failed: got string L"Telamon" om.c:2667: Test failed: got length 14 om.c:2667: Test failed: got max length 16 om.c:2703: Test failed: got string L"Oileus" om.c:2703: Test failed: got length 12 om.c:2703: Test failed: got max length 14
=== w8adm (32 bit report) ===
ntdll: om.c:2590: Test failed: got string L"Telamon" om.c:2590: Test failed: got length 14 om.c:2590: Test failed: got max length 16 om.c:2599: Test failed: got string L"Oileus" om.c:2599: Test failed: got length 12 om.c:2599: Test failed: got max length 14 om.c:2613: Test failed: got string L"Telamon" om.c:2613: Test failed: got length 14 om.c:2613: Test failed: got max length 16 om.c:2640: Test failed: got string L"Telamon" om.c:2640: Test failed: got length 14 om.c:2640: Test failed: got max length 16 om.c:2650: Test failed: got string L"Telamon" om.c:2650: Test failed: got length 14 om.c:2650: Test failed: got max length 16 om.c:2652: Test failed: got string L"Oileus" om.c:2652: Test failed: got length 12 om.c:2652: Test failed: got max length 14 om.c:2667: Test failed: got string L"Telamon" om.c:2667: Test failed: got length 14 om.c:2667: Test failed: got max length 16 om.c:2703: Test failed: got string L"Oileus" om.c:2703: Test failed: got length 12 om.c:2703: Test failed: got max length 14
=== w864 (32 bit report) ===
ntdll: om.c:2576: Test failed: got size 0
=== w1064v1507 (32 bit report) ===
ntdll: om.c:2576: Test failed: got size 0
=== w1064v1809 (32 bit report) ===
ntdll: om.c:2576: Test failed: got size 0
=== w1064 (32 bit report) ===
ntdll: om.c:2576: Test failed: got size 0
=== w1064_tsign (32 bit report) ===
ntdll: om.c:2576: Test failed: got size 0
=== w10pro64 (32 bit report) ===
ntdll: om.c:2576: Test failed: got size 0