selftests: timers: set-timer-lat: fix hang when std out/err are redirected
do_timer_oneshot() uses select() as a timer with FD_SETSIZE and readfs is cleared with FD_ZERO without FD_SET. When stdout and stderr are redirected, the test hangs in select forever. Fix the problem calling select() with readfds empty and nfds zero. This is sufficient for using select() for timer. With this fix "./set-timer-lat > /dev/null 2>&1" no longer hangs. Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com> Acked-by: NGreg Hackmann <ghackmann@google.com> Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
Showing
想要评论请 注册 或 登录