Jinoh Kang (@iamahuman) commented about dlls/ntdll/tests/file.c:
- status = pNtAssociateWaitCompletionPacket(packet, completion, server, (void *)0xa, (void *)0xb,
0xdeadbeef, (ULONG_PTR)0xc, NULL);
- ok(status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", status);
- status = pNtRemoveIoCompletion(completion, &key_context, &apc_context, &iosb, &timeout);
- ok(status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", status);
- ok(key_context == 0xa, "Got unexpected completion key %Id\n", key_context);
- ok(apc_context == 0xb, "Got unexpected completion value %Id\n", apc_context);
- ok(iosb.Information == 0xc, "Got unexpected iosb.Information %Id\n", iosb.Information);
- ok(iosb.Status == 0xdeadbeef, "Got unexpected iosb.Status %#lx\n", iosb.Status);
- completion_count = get_pending_msgs(completion);
- ok(!completion_count, "Unexpected completion count %ld.\n", completion_count);
- /* This test associates the wait completion packet with INVALID_HANDLE_VALUE, which will never
* be signaled */
- status = pNtAssociateWaitCompletionPacket(packet, completion, INVALID_HANDLE_VALUE, (void *)0xa,
Use `GetCurrentProcess()` instead of `INVALID_HANDLE_VALUE` for never-signaled object. Ditto for other tests.