]> git.baikalelectronics.ru Git - kernel.git/commit
ktest: Make sure wait_for_input does honor the timeout
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Wed, 8 Mar 2017 15:36:59 +0000 (10:36 -0500)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Wed, 8 Mar 2017 15:41:37 +0000 (10:41 -0500)
commit4463b5d1e170c68a0eebfdbcf8c3b0c88ea329d7
tree8d90ead71336f264f58014f6b264cfb7f6d485b4
parent8b220987c6d676dbeafe10e3b3aeef8041f136b2
ktest: Make sure wait_for_input does honor the timeout

The function wait_for_input takes in a timeout, and even has a default
timeout. But if for some reason the STDIN descriptor keeps sending in data,
the function will never time out. The timout is to wait for the data from
the passed in file descriptor, not for STDIN. Adding a test in the case
where there's no data from the passed in file descriptor that checks to see
if the timeout passed, will ensure that it will timeout properly even if
there's input in STDIN.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
tools/testing/ktest/ktest.pl