Fix test
Add test for write error when no stdin fd
Add test for stop error when not in stoppable state