server: Use server side named pipe implementation in byte mode.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e5a43fa9c8
commit
7eb7854161
|
@ -2576,7 +2576,6 @@ static void test_readfileex_pending(void)
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
ret = ReadFile(server, read_buf, 0, &num_bytes, &overlapped);
|
ret = ReadFile(server, read_buf, 0, &num_bytes, &overlapped);
|
||||||
ok(!ret, "ReadFile should fail\n");
|
ok(!ret, "ReadFile should fail\n");
|
||||||
todo_wine
|
|
||||||
ok(GetLastError() == ERROR_IO_PENDING, "expected ERROR_IO_PENDING, got %d\n", GetLastError());
|
ok(GetLastError() == ERROR_IO_PENDING, "expected ERROR_IO_PENDING, got %d\n", GetLastError());
|
||||||
ok(num_bytes == 0, "bytes %u\n", num_bytes);
|
ok(num_bytes == 0, "bytes %u\n", num_bytes);
|
||||||
ok((NTSTATUS)overlapped.Internal == STATUS_PENDING, "expected STATUS_PENDING, got %#lx\n", overlapped.Internal);
|
ok((NTSTATUS)overlapped.Internal == STATUS_PENDING, "expected STATUS_PENDING, got %#lx\n", overlapped.Internal);
|
||||||
|
@ -2592,11 +2591,9 @@ todo_wine
|
||||||
ok(num_bytes == 1, "bytes %u\n", num_bytes);
|
ok(num_bytes == 1, "bytes %u\n", num_bytes);
|
||||||
|
|
||||||
wait = WaitForSingleObject(event, 100);
|
wait = WaitForSingleObject(event, 100);
|
||||||
todo_wine
|
|
||||||
ok(wait == WAIT_OBJECT_0, "WaitForSingleObject returned %x\n", wait);
|
ok(wait == WAIT_OBJECT_0, "WaitForSingleObject returned %x\n", wait);
|
||||||
|
|
||||||
ok(num_bytes == 1, "bytes %u\n", num_bytes);
|
ok(num_bytes == 1, "bytes %u\n", num_bytes);
|
||||||
todo_wine
|
|
||||||
ok((NTSTATUS)overlapped.Internal == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", overlapped.Internal);
|
ok((NTSTATUS)overlapped.Internal == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", overlapped.Internal);
|
||||||
ok(overlapped.InternalHigh == 0, "expected 0, got %lu\n", overlapped.InternalHigh);
|
ok(overlapped.InternalHigh == 0, "expected 0, got %lu\n", overlapped.InternalHigh);
|
||||||
|
|
||||||
|
@ -3132,6 +3129,5 @@ START_TEST(pipe)
|
||||||
test_readfileex_pending();
|
test_readfileex_pending();
|
||||||
test_overlapped_transport(TRUE, FALSE);
|
test_overlapped_transport(TRUE, FALSE);
|
||||||
test_overlapped_transport(TRUE, TRUE);
|
test_overlapped_transport(TRUE, TRUE);
|
||||||
if (broken(1)) /* FIXME: Remove once Wine is ready. */
|
test_overlapped_transport(FALSE, FALSE);
|
||||||
test_overlapped_transport(FALSE, FALSE);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -726,7 +726,7 @@ static void WINAPI apc( void *arg, IO_STATUS_BLOCK *iosb, ULONG reserved )
|
||||||
ok( !reserved, "reserved is not 0: %x\n", reserved );
|
ok( !reserved, "reserved is not 0: %x\n", reserved );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_peek(HANDLE pipe, BOOL is_msgmode)
|
static void test_peek(HANDLE pipe)
|
||||||
{
|
{
|
||||||
FILE_PIPE_PEEK_BUFFER buf;
|
FILE_PIPE_PEEK_BUFFER buf;
|
||||||
IO_STATUS_BLOCK iosb;
|
IO_STATUS_BLOCK iosb;
|
||||||
|
@ -745,7 +745,6 @@ static void test_peek(HANDLE pipe, BOOL is_msgmode)
|
||||||
ok(!status || status == STATUS_PENDING, "NtFsControlFile failed: %x\n", status);
|
ok(!status || status == STATUS_PENDING, "NtFsControlFile failed: %x\n", status);
|
||||||
ok(buf.ReadDataAvailable == 1, "ReadDataAvailable = %u\n", buf.ReadDataAvailable);
|
ok(buf.ReadDataAvailable == 1, "ReadDataAvailable = %u\n", buf.ReadDataAvailable);
|
||||||
ok(!iosb.Status, "iosb.Status = %x\n", iosb.Status);
|
ok(!iosb.Status, "iosb.Status = %x\n", iosb.Status);
|
||||||
todo_wine_if(!is_msgmode)
|
|
||||||
ok(is_signaled(event), "event is not signaled\n");
|
ok(is_signaled(event), "event is not signaled\n");
|
||||||
|
|
||||||
CloseHandle(event);
|
CloseHandle(event);
|
||||||
|
@ -857,7 +856,7 @@ static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type)
|
||||||
ret = WriteFile( write, buffer, 1, &written, NULL );
|
ret = WriteFile( write, buffer, 1, &written, NULL );
|
||||||
ok(ret && written == 1, "WriteFile error %d\n", GetLastError());
|
ok(ret && written == 1, "WriteFile error %d\n", GetLastError());
|
||||||
|
|
||||||
test_peek(read, pipe_type & PIPE_TYPE_MESSAGE);
|
test_peek(read);
|
||||||
|
|
||||||
status = NtReadFile( read, event, apc, &apc_count, &iosb, buffer, 1, NULL, NULL );
|
status = NtReadFile( read, event, apc, &apc_count, &iosb, buffer, 1, NULL, NULL );
|
||||||
ok( status == STATUS_SUCCESS, "wrong status %x\n", status );
|
ok( status == STATUS_SUCCESS, "wrong status %x\n", status );
|
||||||
|
@ -984,7 +983,6 @@ static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type)
|
||||||
ok( !apc_count, "apc was called\n" );
|
ok( !apc_count, "apc was called\n" );
|
||||||
CloseHandle( write );
|
CloseHandle( write );
|
||||||
Sleep(1); /* FIXME: needed for wine to run the i/o apc */
|
Sleep(1); /* FIXME: needed for wine to run the i/o apc */
|
||||||
todo_wine_if(!(pipe_type & PIPE_TYPE_MESSAGE) && (pipe_flags & PIPE_ACCESS_OUTBOUND))
|
|
||||||
ok( U(iosb).Status == STATUS_PIPE_BROKEN, "wrong status %x\n", U(iosb).Status );
|
ok( U(iosb).Status == STATUS_PIPE_BROKEN, "wrong status %x\n", U(iosb).Status );
|
||||||
ok( iosb.Information == 0, "wrong info %lu\n", iosb.Information );
|
ok( iosb.Information == 0, "wrong info %lu\n", iosb.Information );
|
||||||
ok( is_signaled( event ), "event is not signaled\n" );
|
ok( is_signaled( event ), "event is not signaled\n" );
|
||||||
|
|
|
@ -294,10 +294,11 @@ static const struct fd_ops named_pipe_device_fd_ops =
|
||||||
default_fd_reselect_async /* reselect_async */
|
default_fd_reselect_async /* reselect_async */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Returns if we handle I/O via server calls. Currently message-mode pipes are handled this way. */
|
/* Returns if we handle I/O via server calls.
|
||||||
|
* FIXME: no longer needed. */
|
||||||
static int use_server_io( struct pipe_end *pipe_end )
|
static int use_server_io( struct pipe_end *pipe_end )
|
||||||
{
|
{
|
||||||
return pipe_end->flags & NAMED_PIPE_MESSAGE_STREAM_WRITE;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void named_pipe_dump( struct object *obj, int verbose )
|
static void named_pipe_dump( struct object *obj, int verbose )
|
||||||
|
|
Loading…
Reference in New Issue