Add simple select test.
Add pipe write test.

Pipe will not be writable if the space left in the pipe is less than
PIPE_BUF, even if we use select or epoll and set the fd to NONBLOCK.