tests/unix_sockets: Remove code duplication

Use a new event-using request function