Piotr Caban (@piotr) commented about dlls/ntoskrnl.exe/tests/ntoskrnl.c:
} else {
ok(GetLastError() == RtlNtStatusToDosErrorNoTeb(expect_status), "got error %lu\n", GetLastError());
ULONG err = RtlNtStatusToDosErrorNoTeb(expect_status);
ok(GetLastError() == err, "got error %lu\n", GetLastError());
This change is not needed. `RtlNtStatusToDosErrorNoTeb` is not setting last error.