gateway: fix wait_forward_request()

We should directly err-return because wi->nr_sent isn't 0 or we'll wrongly goto
again at finish_write.

Signed-off-by: Liu Yuan <tailai.ly@taobao.com>
sheep: add nosync for testing purpose

This is only useful for testing, users are not expected to use it.

Signed-off-by: Liu Yuan <tailai.ly@taobao.com>
tests: enable nosync option for testing

Signed-off-by: Liu Yuan <tailai.ly@taobao.com>
logger: init log formatter for collie

Collie doesn't call select_log_formatter(), so some functions shared by collie
sheep such as connect_to() will call into logger, which then leade to segfault.

We should init log formatter on our own, collie dosen't need bother initinig it.

Signed-off-by: Liu Yuan <tailai.ly@taobao.com>
tests/008: remove hard-coded time assumption

This might spurious failure, so just remove it.

Signed-off-by: Liu Yuan <tailai.ly@taobao.com>
tests/050: fix suprious failure

Don't sleep because we now do no-sync write, which is quite fast.

Signed-off-by: Liu Yuan <tailai.ly@taobao.com>
tests/046: update output to fix spurious failure

Signed-off-by: Liu Yuan <tailai.ly@taobao.com>