tests: fix the return value of bind, srv, and stat