Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/ntoskrnl.exe/tests/driver.c | 42 ++++++++++++++++-- dlls/ntoskrnl.exe/tests/driver.h | 3 ++ dlls/ntoskrnl.exe/tests/ntoskrnl.c | 71 ++++++++++++++++++++++++++++++ 3 files changed, 113 insertions(+), 3 deletions(-)
diff --git a/dlls/ntoskrnl.exe/tests/driver.c b/dlls/ntoskrnl.exe/tests/driver.c index d9a7bf45b4..125cf9b67b 100644 --- a/dlls/ntoskrnl.exe/tests/driver.c +++ b/dlls/ntoskrnl.exe/tests/driver.c @@ -209,6 +209,7 @@ static void *get_proc_address(const char *name) }
static FILE_OBJECT *last_created_file; +static unsigned int create_count, close_count;
static void test_irp_struct(IRP *irp, DEVICE_OBJECT *device) { @@ -1654,7 +1655,7 @@ static NTSTATUS test_basic_ioctl(IRP *irp, IO_STACK_LOCATION *stack, ULONG_PTR * return STATUS_SUCCESS; }
-static NTSTATUS get_cancel_count(IRP *irp, IO_STACK_LOCATION *stack, ULONG_PTR *info) +static NTSTATUS get_dword(IRP *irp, IO_STACK_LOCATION *stack, ULONG_PTR *info, DWORD value) { ULONG length = stack->Parameters.DeviceIoControl.OutputBufferLength; char *buffer = irp->AssociatedIrp.SystemBuffer; @@ -1665,7 +1666,24 @@ static NTSTATUS get_cancel_count(IRP *irp, IO_STACK_LOCATION *stack, ULONG_PTR * if (length < sizeof(DWORD)) return STATUS_BUFFER_TOO_SMALL;
- *(DWORD*)buffer = cancel_cnt; + *(DWORD*)buffer = value; + *info = sizeof(DWORD); + return STATUS_SUCCESS; +} + +static NTSTATUS get_fscontext(IRP *irp, IO_STACK_LOCATION *stack, ULONG_PTR *info) +{ + ULONG length = stack->Parameters.DeviceIoControl.OutputBufferLength; + char *buffer = irp->AssociatedIrp.SystemBuffer; + DWORD *context = stack->FileObject->FsContext; + + if (!buffer || !context) + return STATUS_ACCESS_VIOLATION; + + if (length < sizeof(DWORD)) + return STATUS_BUFFER_TOO_SMALL; + + *(DWORD*)buffer = *context; *info = sizeof(DWORD); return STATUS_SUCCESS; } @@ -1690,8 +1708,13 @@ static NTSTATUS test_load_driver_ioctl(IRP *irp, IO_STACK_LOCATION *stack, ULONG static NTSTATUS WINAPI driver_Create(DEVICE_OBJECT *device, IRP *irp) { IO_STACK_LOCATION *irpsp = IoGetCurrentIrpStackLocation( irp ); + DWORD *context = ExAllocatePool(PagedPool, sizeof(*context));
last_created_file = irpsp->FileObject; + ++create_count; + if (context) + *context = create_count; + irpsp->FileObject->FsContext = context; create_caller_thread = KeGetCurrentThread();
irp->IoStatus.Status = STATUS_SUCCESS; @@ -1724,7 +1747,16 @@ static NTSTATUS WINAPI driver_IoControl(DEVICE_OBJECT *device, IRP *irp) IoMarkIrpPending(irp); return STATUS_PENDING; case IOCTL_WINETEST_GET_CANCEL_COUNT: - status = get_cancel_count(irp, stack, &irp->IoStatus.Information); + status = get_dword(irp, stack, &irp->IoStatus.Information, cancel_cnt); + break; + case IOCTL_WINETEST_GET_CREATE_COUNT: + status = get_dword(irp, stack, &irp->IoStatus.Information, create_count); + break; + case IOCTL_WINETEST_GET_CLOSE_COUNT: + status = get_dword(irp, stack, &irp->IoStatus.Information, close_count); + break; + case IOCTL_WINETEST_GET_FSCONTEXT: + status = get_fscontext(irp, stack, &irp->IoStatus.Information); break; case IOCTL_WINETEST_DETACH: IoDetachDevice(lower_device); @@ -1756,6 +1788,10 @@ static NTSTATUS WINAPI driver_FlushBuffers(DEVICE_OBJECT *device, IRP *irp)
static NTSTATUS WINAPI driver_Close(DEVICE_OBJECT *device, IRP *irp) { + IO_STACK_LOCATION *stack = IoGetCurrentIrpStackLocation(irp); + ++close_count; + if (stack->FileObject->FsContext) + ExFreePool(stack->FileObject->FsContext); irp->IoStatus.Status = STATUS_SUCCESS; IoCompleteRequest(irp, IO_NO_INCREMENT); return STATUS_SUCCESS; diff --git a/dlls/ntoskrnl.exe/tests/driver.h b/dlls/ntoskrnl.exe/tests/driver.h index d5ff09ac42..a468cbda9e 100644 --- a/dlls/ntoskrnl.exe/tests/driver.h +++ b/dlls/ntoskrnl.exe/tests/driver.h @@ -29,6 +29,9 @@ #define IOCTL_WINETEST_TEST_CANCEL CTL_CODE(FILE_DEVICE_UNKNOWN, 0x804, METHOD_BUFFERED, FILE_ANY_ACCESS) #define IOCTL_WINETEST_GET_CANCEL_COUNT CTL_CODE(FILE_DEVICE_UNKNOWN, 0x805, METHOD_BUFFERED, FILE_ANY_ACCESS) #define IOCTL_WINETEST_DETACH CTL_CODE(FILE_DEVICE_UNKNOWN, 0x806, METHOD_BUFFERED, FILE_ANY_ACCESS) +#define IOCTL_WINETEST_GET_CREATE_COUNT CTL_CODE(FILE_DEVICE_UNKNOWN, 0x807, METHOD_BUFFERED, FILE_ANY_ACCESS) +#define IOCTL_WINETEST_GET_CLOSE_COUNT CTL_CODE(FILE_DEVICE_UNKNOWN, 0x808, METHOD_BUFFERED, FILE_ANY_ACCESS) +#define IOCTL_WINETEST_GET_FSCONTEXT CTL_CODE(FILE_DEVICE_UNKNOWN, 0x809, METHOD_BUFFERED, FILE_ANY_ACCESS)
static const char teststr[] = "Wine is not an emulator";
diff --git a/dlls/ntoskrnl.exe/tests/ntoskrnl.c b/dlls/ntoskrnl.exe/tests/ntoskrnl.c index 48ddb299cf..dfd0cb3ba6 100644 --- a/dlls/ntoskrnl.exe/tests/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/tests/ntoskrnl.c @@ -318,6 +318,76 @@ static void test_load_driver(SC_HANDLE service) ok(status.dwCurrentState == SERVICE_STOPPED, "got state %#x\n", status.dwCurrentState); }
+static void test_file_handles(void) +{ + DWORD count, ret_size; + HANDLE file, dup, file2; + BOOL ret; + + ret = DeviceIoControl(device, IOCTL_WINETEST_GET_CREATE_COUNT, NULL, 0, &count, sizeof(count), &ret_size, NULL); + ok(ret, "ioctl failed: %u\n", GetLastError()); + ok(count == 2, "got %u\n", count); + + ret = DeviceIoControl(device, IOCTL_WINETEST_GET_CLOSE_COUNT, NULL, 0, &count, sizeof(count), &ret_size, NULL); + ok(ret, "ioctl failed: %u\n", GetLastError()); + ok(count == 1, "got %u\n", count); + + file = CreateFileA("\\.\WineTestDriver", 0, 0, NULL, OPEN_EXISTING, 0, NULL); + ok(file != INVALID_HANDLE_VALUE, "failed to open device: %u\n", GetLastError()); + + ret = DeviceIoControl(device, IOCTL_WINETEST_GET_CREATE_COUNT, NULL, 0, &count, sizeof(count), &ret_size, NULL); + ok(ret, "ioctl failed: %u\n", GetLastError()); + ok(count == 3, "got %u\n", count); + + file2 = CreateFileA("\\.\WineTestDriver", 0, 0, NULL, OPEN_EXISTING, 0, NULL); + ok(file2 != INVALID_HANDLE_VALUE, "failed to open device: %u\n", GetLastError()); + + ret = DeviceIoControl(device, IOCTL_WINETEST_GET_CREATE_COUNT, NULL, 0, &count, sizeof(count), &ret_size, NULL); + ok(ret, "ioctl failed: %u\n", GetLastError()); + ok(count == 4, "got %u\n", count); + + ret = DuplicateHandle(GetCurrentProcess(), file, GetCurrentProcess(), &dup, 0, FALSE, DUPLICATE_SAME_ACCESS); + ok(ret, "failed to duplicate handle: %u\n", GetLastError()); + + ret = DeviceIoControl(device, IOCTL_WINETEST_GET_CREATE_COUNT, NULL, 0, &count, sizeof(count), &ret_size, NULL); + ok(ret, "ioctl failed: %u\n", GetLastError()); + ok(count == 4, "got %u\n", count); + + ret = DeviceIoControl(device, IOCTL_WINETEST_GET_FSCONTEXT, NULL, 0, &count, sizeof(count), &ret_size, NULL); + ok(ret, "ioctl failed: %u\n", GetLastError()); + ok(count == 1, "got %u\n", count); + + ret = DeviceIoControl(file, IOCTL_WINETEST_GET_FSCONTEXT, NULL, 0, &count, sizeof(count), &ret_size, NULL); + ok(ret, "ioctl failed: %u\n", GetLastError()); + ok(count == 3, "got %u\n", count); + + ret = DeviceIoControl(file2, IOCTL_WINETEST_GET_FSCONTEXT, NULL, 0, &count, sizeof(count), &ret_size, NULL); + ok(ret, "ioctl failed: %u\n", GetLastError()); + ok(count == 4, "got %u\n", count); + + ret = DeviceIoControl(dup, IOCTL_WINETEST_GET_FSCONTEXT, NULL, 0, &count, sizeof(count), &ret_size, NULL); + ok(ret, "ioctl failed: %u\n", GetLastError()); + ok(count == 3, "got %u\n", count); + + CloseHandle(dup); + + ret = DeviceIoControl(device, IOCTL_WINETEST_GET_CLOSE_COUNT, NULL, 0, &count, sizeof(count), &ret_size, NULL); + ok(ret, "ioctl failed: %u\n", GetLastError()); + ok(count == 1, "got %u\n", count); + + CloseHandle(file2); + + ret = DeviceIoControl(device, IOCTL_WINETEST_GET_CLOSE_COUNT, NULL, 0, &count, sizeof(count), &ret_size, NULL); + ok(ret, "ioctl failed: %u\n", GetLastError()); + ok(count == 2, "got %u\n", count); + + CloseHandle(file); + + ret = DeviceIoControl(device, IOCTL_WINETEST_GET_CLOSE_COUNT, NULL, 0, &count, sizeof(count), &ret_size, NULL); + ok(ret, "ioctl failed: %u\n", GetLastError()); + ok(count == 3, "got %u\n", count); +} + static void test_driver3(void) { char filename[MAX_PATH]; @@ -369,6 +439,7 @@ START_TEST(ntoskrnl) main_test(); test_overlapped(); test_load_driver(service2); + test_file_handles();
/* We need a separate ioctl to call IoDetachDevice(); calling it in the * driver unload routine causes a live-lock. */
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/ntoskrnl.exe/tests/driver.c | 21 +++++++++ dlls/ntoskrnl.exe/tests/driver.h | 1 + dlls/ntoskrnl.exe/tests/ntoskrnl.c | 71 ++++++++++++++++++++++++++++++ 3 files changed, 93 insertions(+)
diff --git a/dlls/ntoskrnl.exe/tests/driver.c b/dlls/ntoskrnl.exe/tests/driver.c index 125cf9b67b..3c5c1ace5c 100644 --- a/dlls/ntoskrnl.exe/tests/driver.c +++ b/dlls/ntoskrnl.exe/tests/driver.c @@ -1688,6 +1688,24 @@ static NTSTATUS get_fscontext(IRP *irp, IO_STACK_LOCATION *stack, ULONG_PTR *inf return STATUS_SUCCESS; }
+static NTSTATUS return_status(IRP *irp, IO_STACK_LOCATION *stack, ULONG_PTR *info) +{ + char *buffer = irp->AssociatedIrp.SystemBuffer; + NTSTATUS ret; + + if (!buffer) + return STATUS_ACCESS_VIOLATION; + + if (stack->Parameters.DeviceIoControl.InputBufferLength < sizeof(DWORD) + || stack->Parameters.DeviceIoControl.OutputBufferLength < 3) + return STATUS_BUFFER_TOO_SMALL; + + ret = *(DWORD *)irp->AssociatedIrp.SystemBuffer; + memcpy(buffer, "ghi", 3); + *info = 3; + return ret; +} + static NTSTATUS test_load_driver_ioctl(IRP *irp, IO_STACK_LOCATION *stack, ULONG_PTR *info) { BOOL *load = irp->AssociatedIrp.SystemBuffer; @@ -1758,6 +1776,9 @@ static NTSTATUS WINAPI driver_IoControl(DEVICE_OBJECT *device, IRP *irp) case IOCTL_WINETEST_GET_FSCONTEXT: status = get_fscontext(irp, stack, &irp->IoStatus.Information); break; + case IOCTL_WINETEST_RETURN_STATUS: + status = return_status(irp, stack, &irp->IoStatus.Information); + break; case IOCTL_WINETEST_DETACH: IoDetachDevice(lower_device); status = STATUS_SUCCESS; diff --git a/dlls/ntoskrnl.exe/tests/driver.h b/dlls/ntoskrnl.exe/tests/driver.h index a468cbda9e..313d554a37 100644 --- a/dlls/ntoskrnl.exe/tests/driver.h +++ b/dlls/ntoskrnl.exe/tests/driver.h @@ -32,6 +32,7 @@ #define IOCTL_WINETEST_GET_CREATE_COUNT CTL_CODE(FILE_DEVICE_UNKNOWN, 0x807, METHOD_BUFFERED, FILE_ANY_ACCESS) #define IOCTL_WINETEST_GET_CLOSE_COUNT CTL_CODE(FILE_DEVICE_UNKNOWN, 0x808, METHOD_BUFFERED, FILE_ANY_ACCESS) #define IOCTL_WINETEST_GET_FSCONTEXT CTL_CODE(FILE_DEVICE_UNKNOWN, 0x809, METHOD_BUFFERED, FILE_ANY_ACCESS) +#define IOCTL_WINETEST_RETURN_STATUS CTL_CODE(FILE_DEVICE_UNKNOWN, 0x80a, METHOD_BUFFERED, FILE_ANY_ACCESS)
static const char teststr[] = "Wine is not an emulator";
diff --git a/dlls/ntoskrnl.exe/tests/ntoskrnl.c b/dlls/ntoskrnl.exe/tests/ntoskrnl.c index dfd0cb3ba6..c701cf21d8 100644 --- a/dlls/ntoskrnl.exe/tests/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/tests/ntoskrnl.c @@ -21,6 +21,8 @@ */
#include <stdio.h> +#include "ntstatus.h" +#define WIN32_NO_STATUS #include "windows.h" #include "winsvc.h" #include "winioctl.h" @@ -388,6 +390,74 @@ static void test_file_handles(void) ok(count == 3, "got %u\n", count); }
+static void test_return_status(void) +{ + NTSTATUS status; + char buffer[7]; + DWORD ret_size; + BOOL ret; + + strcpy(buffer, "abcdef"); + status = STATUS_SUCCESS; + SetLastError(0xdeadbeef); + ret = DeviceIoControl(device, IOCTL_WINETEST_RETURN_STATUS, &status, + sizeof(status), buffer, sizeof(buffer), &ret_size, NULL); + ok(ret, "ioctl failed\n"); + ok(GetLastError() == 0xdeadbeef, "got error %u\n", GetLastError()); + ok(!strcmp(buffer, "ghidef"), "got buffer %s\n", buffer); + ok(ret_size == 3, "got size %u\n", ret_size); + + strcpy(buffer, "abcdef"); + status = STATUS_TIMEOUT; + SetLastError(0xdeadbeef); + ret = DeviceIoControl(device, IOCTL_WINETEST_RETURN_STATUS, &status, + sizeof(status), buffer, sizeof(buffer), &ret_size, NULL); + todo_wine ok(ret, "ioctl failed\n"); + todo_wine ok(GetLastError() == 0xdeadbeef, "got error %u\n", GetLastError()); + ok(!strcmp(buffer, "ghidef"), "got buffer %s\n", buffer); + ok(ret_size == 3, "got size %u\n", ret_size); + + strcpy(buffer, "abcdef"); + status = 0x0eadbeef; + SetLastError(0xdeadbeef); + ret = DeviceIoControl(device, IOCTL_WINETEST_RETURN_STATUS, &status, + sizeof(status), buffer, sizeof(buffer), &ret_size, NULL); + todo_wine ok(ret, "ioctl failed\n"); + todo_wine ok(GetLastError() == 0xdeadbeef, "got error %u\n", GetLastError()); + ok(!strcmp(buffer, "ghidef"), "got buffer %s\n", buffer); + ok(ret_size == 3, "got size %u\n", ret_size); + + strcpy(buffer, "abcdef"); + status = 0x4eadbeef; + SetLastError(0xdeadbeef); + ret = DeviceIoControl(device, IOCTL_WINETEST_RETURN_STATUS, &status, + sizeof(status), buffer, sizeof(buffer), &ret_size, NULL); + todo_wine ok(ret, "ioctl failed\n"); + todo_wine ok(GetLastError() == 0xdeadbeef, "got error %u\n", GetLastError()); + ok(!strcmp(buffer, "ghidef"), "got buffer %s\n", buffer); + ok(ret_size == 3, "got size %u\n", ret_size); + + strcpy(buffer, "abcdef"); + status = 0x8eadbeef; + SetLastError(0xdeadbeef); + ret = DeviceIoControl(device, IOCTL_WINETEST_RETURN_STATUS, &status, + sizeof(status), buffer, sizeof(buffer), &ret_size, NULL); + ok(!ret, "ioctl succeeded\n"); + ok(GetLastError() == ERROR_MR_MID_NOT_FOUND, "got error %u\n", GetLastError()); + todo_wine ok(!strcmp(buffer, "ghidef"), "got buffer %s\n", buffer); + todo_wine ok(ret_size == 3, "got size %u\n", ret_size); + + strcpy(buffer, "abcdef"); + status = 0xceadbeef; + SetLastError(0xdeadbeef); + ret = DeviceIoControl(device, IOCTL_WINETEST_RETURN_STATUS, &status, + sizeof(status), buffer, sizeof(buffer), &ret_size, NULL); + ok(!ret, "ioctl succeeded\n"); + ok(GetLastError() == ERROR_MR_MID_NOT_FOUND, "got error %u\n", GetLastError()); + ok(!strcmp(buffer, "abcdef"), "got buffer %s\n", buffer); + todo_wine ok(ret_size == 3, "got size %u\n", ret_size); +} + static void test_driver3(void) { char filename[MAX_PATH]; @@ -440,6 +510,7 @@ START_TEST(ntoskrnl) test_overlapped(); test_load_driver(service2); test_file_handles(); + test_return_status();
/* We need a separate ioctl to call IoDetachDevice(); calling it in the * driver unload routine causes a live-lock. */
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=55238
Your paranoid android.
=== w8 (task log) ===
Task errors: The previous 1 run(s) terminated abnormally
=== wvistau64 (64 bit report) ===
ntoskrnl.exe: ntoskrnl: Timeout
=== w2008s64 (64 bit report) ===
ntoskrnl.exe: ntoskrnl: Timeout
=== w7pro64 (64 bit report) ===
ntoskrnl.exe: ntoskrnl: Timeout
=== w864 (64 bit report) ===
ntoskrnl.exe: ntoskrnl: Timeout
=== w1064v1507 (64 bit report) ===
ntoskrnl.exe: ntoskrnl: Timeout
=== w1064v1809 (64 bit report) ===
ntoskrnl.exe: ntoskrnl: Timeout
=== debian10 (32 bit report) ===
Report errors: ntoskrnl.exe:ntoskrnl contains a misplaced todo message for driver
=== debian10 (32 bit French report) ===
Report errors: ntoskrnl.exe:ntoskrnl contains a misplaced todo message for driver
=== debian10 (32 bit Japanese:Japan report) ===
Report errors: ntoskrnl.exe:ntoskrnl contains a misplaced todo message for driver
=== debian10 (32 bit Chinese:China report) ===
Report errors: ntoskrnl.exe:ntoskrnl contains a misplaced todo message for driver
=== debian10 (32 bit WoW report) ===
Report errors: ntoskrnl.exe:ntoskrnl contains a misplaced todo message for driver
=== debian10 (64 bit WoW report) ===
Report errors: ntoskrnl.exe:ntoskrnl contains a misplaced todo message for driver
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/ntoskrnl.exe/ntoskrnl.c | 2 +- dlls/ntoskrnl.exe/tests/ntoskrnl.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index 9be6e34547..2738d727f0 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -440,9 +440,9 @@ static NTSTATUS WINAPI dispatch_irp_completion( DEVICE_OBJECT *device, IRP *irp, { req->handle = wine_server_obj_handle( irp_handle ); req->status = irp->IoStatus.u.Status; + req->size = irp->IoStatus.Information; if (irp->IoStatus.u.Status >= 0) { - req->size = irp->IoStatus.Information; if (out_buff) wine_server_add_data( req, out_buff, irp->IoStatus.Information ); } status = wine_server_call( req ); diff --git a/dlls/ntoskrnl.exe/tests/ntoskrnl.c b/dlls/ntoskrnl.exe/tests/ntoskrnl.c index c701cf21d8..e7a8cc987a 100644 --- a/dlls/ntoskrnl.exe/tests/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/tests/ntoskrnl.c @@ -445,7 +445,7 @@ static void test_return_status(void) ok(!ret, "ioctl succeeded\n"); ok(GetLastError() == ERROR_MR_MID_NOT_FOUND, "got error %u\n", GetLastError()); todo_wine ok(!strcmp(buffer, "ghidef"), "got buffer %s\n", buffer); - todo_wine ok(ret_size == 3, "got size %u\n", ret_size); + ok(ret_size == 3, "got size %u\n", ret_size);
strcpy(buffer, "abcdef"); status = 0xceadbeef; @@ -455,7 +455,7 @@ static void test_return_status(void) ok(!ret, "ioctl succeeded\n"); ok(GetLastError() == ERROR_MR_MID_NOT_FOUND, "got error %u\n", GetLastError()); ok(!strcmp(buffer, "abcdef"), "got buffer %s\n", buffer); - todo_wine ok(ret_size == 3, "got size %u\n", ret_size); + ok(ret_size == 3, "got size %u\n", ret_size); }
static void test_driver3(void)
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=55239
Your paranoid android.
=== w8 (32 bit report) ===
Report errors: The report seems to have been truncated
=== w8 (task log) ===
Task errors: An error occurred while waiting for the test to complete: the 2776 process does not exist or is not a child process The test VM has crashed, rebooted or lost connectivity (or the TestAgent server died) The previous 2 run(s) terminated abnormally
=== wvistau64 (64 bit report) ===
ntoskrnl.exe: ntoskrnl: Timeout
=== w2008s64 (64 bit report) ===
ntoskrnl.exe: ntoskrnl: Timeout
=== w7pro64 (task log) ===
Task errors: The task timed out
=== w864 (64 bit report) ===
ntoskrnl.exe: ntoskrnl: Timeout
=== w1064v1507 (64 bit report) ===
ntoskrnl.exe: ntoskrnl: Timeout
=== w1064v1809 (64 bit report) ===
ntoskrnl.exe: ntoskrnl: Timeout
=== debian10 (32 bit report) ===
Report errors: ntoskrnl.exe:ntoskrnl contains a misplaced todo message for driver
=== debian10 (32 bit French report) ===
Report errors: ntoskrnl.exe:ntoskrnl contains a misplaced todo message for driver
=== debian10 (32 bit Japanese:Japan report) ===
Report errors: ntoskrnl.exe:ntoskrnl contains a misplaced todo message for driver
=== debian10 (32 bit Chinese:China report) ===
Report errors: ntoskrnl.exe:ntoskrnl contains a misplaced todo message for driver
=== debian10 (32 bit WoW report) ===
Report errors: ntoskrnl.exe:ntoskrnl contains a misplaced todo message for driver
=== debian10 (64 bit WoW report) ===
Report errors: ntoskrnl.exe:ntoskrnl contains a misplaced todo message for driver
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/ntoskrnl.exe/ntoskrnl.c | 2 +- dlls/ntoskrnl.exe/tests/ntoskrnl.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index 2738d727f0..b8c6cce1e6 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -441,7 +441,7 @@ static NTSTATUS WINAPI dispatch_irp_completion( DEVICE_OBJECT *device, IRP *irp, req->handle = wine_server_obj_handle( irp_handle ); req->status = irp->IoStatus.u.Status; req->size = irp->IoStatus.Information; - if (irp->IoStatus.u.Status >= 0) + if ((irp->IoStatus.u.Status & 0xc0000000) != 0xc0000000) { if (out_buff) wine_server_add_data( req, out_buff, irp->IoStatus.Information ); } diff --git a/dlls/ntoskrnl.exe/tests/ntoskrnl.c b/dlls/ntoskrnl.exe/tests/ntoskrnl.c index e7a8cc987a..86dce75f29 100644 --- a/dlls/ntoskrnl.exe/tests/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/tests/ntoskrnl.c @@ -444,7 +444,7 @@ static void test_return_status(void) sizeof(status), buffer, sizeof(buffer), &ret_size, NULL); ok(!ret, "ioctl succeeded\n"); ok(GetLastError() == ERROR_MR_MID_NOT_FOUND, "got error %u\n", GetLastError()); - todo_wine ok(!strcmp(buffer, "ghidef"), "got buffer %s\n", buffer); + ok(!strcmp(buffer, "ghidef"), "got buffer %s\n", buffer); ok(ret_size == 3, "got size %u\n", ret_size);
strcpy(buffer, "abcdef");
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=55240
Your paranoid android.
=== w8 (task log) ===
Task errors: The previous 1 run(s) terminated abnormally
=== wvistau64 (64 bit report) ===
ntoskrnl.exe: ntoskrnl: Timeout
=== w2008s64 (64 bit report) ===
ntoskrnl.exe: ntoskrnl: Timeout
=== w7pro64 (task log) ===
Task errors: The task timed out
=== w864 (64 bit report) ===
ntoskrnl.exe: ntoskrnl: Timeout
=== w1064v1507 (64 bit report) ===
ntoskrnl.exe: ntoskrnl: Timeout
=== w1064v1809 (64 bit report) ===
ntoskrnl.exe: ntoskrnl: Timeout
=== debian10 (32 bit report) ===
Report errors: ntoskrnl.exe:ntoskrnl contains a misplaced todo message for driver
=== debian10 (32 bit French report) ===
Report errors: ntoskrnl.exe:ntoskrnl contains a misplaced todo message for driver
=== debian10 (32 bit Japanese:Japan report) ===
Report errors: ntoskrnl.exe:ntoskrnl contains a misplaced todo message for driver
=== debian10 (32 bit Chinese:China report) ===
Report errors: ntoskrnl.exe:ntoskrnl contains a misplaced todo message for driver
=== debian10 (32 bit WoW report) ===
Report errors: ntoskrnl.exe:ntoskrnl contains a misplaced todo message for driver
=== debian10 (64 bit WoW report) ===
Report errors: ntoskrnl.exe:ntoskrnl contains a misplaced todo message for driver
Zebediah Figura z.figura12@gmail.com wrote:
if ((irp->IoStatus.u.Status & 0xc0000000) != 0xc0000000)
This is STATUS_SEVERITY_ERROR, and there's NT_ERROR() macro to check for it.
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=55237
Your paranoid android.
=== wvistau64 (task log) ===
Task errors: The task timed out
=== w2008s64 (64 bit report) ===
ntoskrnl.exe: ntoskrnl: Timeout
=== w7pro64 (64 bit report) ===
ntoskrnl.exe: ntoskrnl: Timeout
=== w864 (64 bit report) ===
ntoskrnl.exe: ntoskrnl: Timeout
=== w1064v1507 (64 bit report) ===
ntoskrnl.exe: ntoskrnl: Timeout
=== w1064v1809 (64 bit report) ===
ntoskrnl.exe: ntoskrnl: Timeout
=== debian10 (32 bit report) ===
Report errors: ntoskrnl.exe:ntoskrnl contains a misplaced todo message for driver
=== debian10 (32 bit French report) ===
Report errors: ntoskrnl.exe:ntoskrnl contains a misplaced todo message for driver
=== debian10 (32 bit Japanese:Japan report) ===
Report errors: ntoskrnl.exe:ntoskrnl contains a misplaced todo message for driver
=== debian10 (32 bit Chinese:China report) ===
Report errors: ntoskrnl.exe:ntoskrnl contains a misplaced todo message for driver
=== debian10 (32 bit WoW report) ===
Report errors: ntoskrnl.exe:ntoskrnl contains a misplaced todo message for driver
=== debian10 (64 bit WoW report) ===
Report errors: ntoskrnl.exe:ntoskrnl contains a misplaced todo message for driver