Comment 1 for bug 1001112

Revision history for this message
Yongqin Liu (liuyq0307) wrote :

And another reason seems to the wrong usage of pexpect.TIMEOUT.
Below is the related talk with mwhudson:

<liuyq> mwhudson, in method wait_home_screen, it is now using "self.run(cmd, response=['stopped', pexpect.TIMEOUT], timeout=5)" to catch timeout
<liuyq> mwhudson, but in fact, the "TIMEOUT: Timeout exceeded in read_nonblocking()." is not caught
<liuyq> mwhudson, so I consider how about trying catch TIMEOUT sentence there
<liuyq> mwhudson, not catch the timeout in the response
<liuyq> mwhudson, how do you think about that?
<mwhudson> liuyq: oh heh
<mwhudson> liuyq: that sounds like a bug actually
<mwhudson> liuyq: if you pass pexpect.TIMEOUT in response the code still waits for the prompt
<mwhudson> and that probably won't appear
<mwhudson> so it will raise an exception
<mwhudson> liuyq: can you file a bug on lava-dispatcher about this?
<mwhudson> liuyq: in the mean time, just catch pexpect.TIMEOUT I guess
<liuyq> mwhudson, sorry, why do you say "and that probably won't appear", the prompt “root@linaro” should appear
<mwhudson> liuyq: but it only waits one more second for the root@linaro to appear
<mwhudson> liuyq: if the timeout is 5 seconds and nothing has appeared, the root@linaro _probably_ won't appear in that 1 more second