[4/6] ntdll/tests: Mark the NtReadFile call which returns STATUS_SUCCESS for an overlapped IO call as broken, and don't test returned values in broken case.

Dmitry Timoshkov dmitry at baikal.ru
Wed Aug 21 04:34:28 CDT 2013


---
 dlls/ntdll/tests/file.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index e30ada0..19e2f8a 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -781,6 +781,8 @@ static void read_file_test(void)
     iosb.Information = 0xdeadbeef;
     offset.QuadPart = strlen(text) + 2;
     status = pNtReadFile( handle, event, apc, &apc_count, &iosb, buffer, 2, &offset, NULL );
+todo_wine
+    ok(status == STATUS_PENDING || broken(status == STATUS_SUCCESS) /* before Vista */, "expected STATUS_PENDING, got %#x\n", status);
     if (status == STATUS_PENDING)  /* vista */
     {
         WaitForSingleObject( event, 1000 );
@@ -791,16 +793,6 @@ static void read_file_test(void)
         SleepEx( 1, TRUE ); /* alertable sleep */
         ok( apc_count == 1, "apc was not called\n" );
     }
-    else
-    {
-        ok( status == STATUS_END_OF_FILE, "wrong status %x\n", status );
-        ok( U(iosb).Status == 0xdeadbabe, "wrong status %x\n", U(iosb).Status );
-        ok( iosb.Information == 0xdeadbeef, "wrong info %lu\n", iosb.Information );
-        ok( !is_signaled( event ), "event is signaled\n" );
-        ok( !apc_count, "apc was called\n" );
-        SleepEx( 1, TRUE ); /* alertable sleep */
-        ok( !apc_count, "apc was called\n" );
-    }
     CloseHandle( handle );
 
     /* now a non-overlapped file */
-- 
1.8.3.4




More information about the wine-patches mailing list