]> 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)
commit0f2e6da545a7231a57dd20a8a86b3c72522cab3e
tree8d90ead71336f264f58014f6b264cfb7f6d485b4
parentec3372bf7a4faee70a3e5427dceeba113c8cf8ec
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