Setting LastError to ERROR_SUCCESS in GetOverlappedResult seems to be broken.
Example test failure: http://test.winehq.org/data/c6ff0e01224e86c7baa31d019fcb0a7bf03e2f96/win10_d...
Patch tested: https://testbot.winehq.org/JobDetails.pl?Key=50279
-- bye bye ... ... Detlef
Signed-off-by: Detlef Riekenberg wine.dev@web.de --- dlls/ntdll/tests/file.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c index d107c2ed2b..0aa3c041af 100644 --- a/dlls/ntdll/tests/file.c +++ b/dlls/ntdll/tests/file.c @@ -4464,7 +4464,8 @@ static void test_read_write(void) SetLastError(0xdeadbeef); ret = GetOverlappedResult(hfile, &ovl, &bytes, TRUE); ok(ret, "GetOverlappedResult should report TRUE\n"); - ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError()); + ok((GetLastError() == 0xdeadbeef) || broken(GetLastError() == ERROR_SUCCESS), + "expected 0xdeadbeef, got %d\n", GetLastError()); ok(bytes == 0, "expected 0, read %u\n", bytes); ok((NTSTATUS)ovl.Internal == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", ovl.Internal); ok(ovl.InternalHigh == 0, "expected 0, got %lu\n", ovl.InternalHigh); @@ -4493,7 +4494,8 @@ static void test_read_write(void) SetLastError(0xdeadbeef); ret = GetOverlappedResult(hfile, &ovl, &bytes, TRUE); ok(ret, "GetOverlappedResult should report TRUE\n"); - ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError()); + ok((GetLastError() == 0xdeadbeef) || broken(GetLastError() == ERROR_SUCCESS), + "expected 0xdeadbeef, got %d\n", GetLastError()); ok(bytes == 0, "expected 0, read %u\n", bytes); ok((NTSTATUS)ovl.Internal == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", ovl.Internal); ok(ovl.InternalHigh == 0, "expected 0, got %lu\n", ovl.InternalHigh); -- 2.21.0.windows.1
On 3/31/19 6:34 PM, Detlef Riekenberg wrote:
Setting LastError to ERROR_SUCCESS in GetOverlappedResult seems to be broken.
Example test failure: http://test.winehq.org/data/c6ff0e01224e86c7baa31d019fcb0a7bf03e2f96/win10_d...
Patch tested: https://testbot.winehq.org/JobDetails.pl?Key=50279
-- bye bye ... ... Detlef
Signed-off-by: Detlef Riekenberg wine.dev@web.de
dlls/ntdll/tests/file.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c index d107c2ed2b..0aa3c041af 100644 --- a/dlls/ntdll/tests/file.c +++ b/dlls/ntdll/tests/file.c @@ -4464,7 +4464,8 @@ static void test_read_write(void) SetLastError(0xdeadbeef); ret = GetOverlappedResult(hfile, &ovl, &bytes, TRUE); ok(ret, "GetOverlappedResult should report TRUE\n");
ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError());
ok((GetLastError() == 0xdeadbeef) || broken(GetLastError() == ERROR_SUCCESS),
"expected 0xdeadbeef, got %d\n", GetLastError()); ok(bytes == 0, "expected 0, read %u\n", bytes); ok((NTSTATUS)ovl.Internal == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", ovl.Internal); ok(ovl.InternalHigh == 0, "expected 0, got %lu\n", ovl.InternalHigh);
@@ -4493,7 +4494,8 @@ static void test_read_write(void) SetLastError(0xdeadbeef); ret = GetOverlappedResult(hfile, &ovl, &bytes, TRUE); ok(ret, "GetOverlappedResult should report TRUE\n");
ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError());
ok((GetLastError() == 0xdeadbeef) || broken(GetLastError() == ERROR_SUCCESS),
"expected 0xdeadbeef, got %d\n", GetLastError()); ok(bytes == 0, "expected 0, read %u\n", bytes); ok((NTSTATUS)ovl.Internal == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", ovl.Internal); ok(ovl.InternalHigh == 0, "expected 0, got %lu\n", ovl.InternalHigh);
-- 2.21.0.windows.1
Maybe we should remove those error tests altogether, it's successful cases anyway.