Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 01db7fbf authored by Shuah Khan's avatar Shuah Khan
Browse files

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: default avatarShuah Khan <shuahkh@osg.samsung.com>
Acked-by: default avatarGreg Hackmann <ghackmann@google.com>
Signed-off-by: default avatarShuah Khan <shuahkh@osg.samsung.com>
parent 21aadfa2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment