It's already there, in socktest.pike.
Stdio.Buffer Socket test using PollDeviceBackend Child: Testing accept Failed to read complete data, errno=0, "Success". 10:Input buffer: 28266 bytes. 10:Expected data: 28266 bytes.
Child failed with errcode 1 Parent: Testing accept Failed to read complete data, errno=0, "Success". 10:Input buffer: 28266 bytes. 10:Expected data: 28266 bytes.
Stdio.Buffer Socket test using PollDeviceBackend in IPv6 mode Child: Testing accept Failed to read complete data, errno=0, "Success". 10:Input buffer: 28266 bytes. 10:Expected data: 28266 bytes.
Child failed with errcode 1 Parent: Testing accept Failed to read complete data, errno=0, "Success". 10:Input buffer: 28266 bytes. 10:Expected data: 28266 bytes.