Fix the test to fail

* Sometimes Input/output error occurs pexpect in response to the output of ps.
* It has not been backed up env because a shallow copy.