OpenCloudOS-Kernel/tools/testing/selftests/timers
Shuah Khan 01db7fbf54 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: Shuah Khan <shuahkh@osg.samsung.com>
Acked-by: Greg Hackmann <ghackmann@google.com>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2017-09-25 10:09:06 -06:00
..
.gitignore selftests: add missing set-tz to timers .gitignore 2016-12-08 08:51:14 -07:00
Makefile selftests: change lib.mk RUN_TESTS to take test list as an argument 2017-08-25 10:15:24 -06:00
adjtick.c selftests: timers: drop support for !KTEST case 2017-08-22 11:15:59 -06:00
alarmtimer-suspend.c selftests: timers: drop support for !KTEST case 2017-08-22 11:15:59 -06:00
change_skew.c selftests: timers: drop support for !KTEST case 2017-08-22 11:15:59 -06:00
clocksource-switch.c selftests/timers: make loop consistent with array size 2017-08-25 10:00:51 -06:00
freq-step.c Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-09-04 13:06:34 -07:00
inconsistency-check.c selftests: timers: drop support for !KTEST case 2017-08-22 11:15:59 -06:00
leap-a-day.c kselftests: timers: leap-a-day: Change default arguments to help test runs 2017-08-22 11:34:52 -06:00
leapcrash.c selftests: timers: drop support for !KTEST case 2017-08-22 11:15:59 -06:00
mqueue-lat.c selftests: timers: drop support for !KTEST case 2017-08-22 11:15:59 -06:00
nanosleep.c selftests: timers: drop support for !KTEST case 2017-08-22 11:15:59 -06:00
nsleep-lat.c selftests: timers: drop support for !KTEST case 2017-08-22 11:15:59 -06:00
posix_timers.c selftests/timers: Add missing error code assignment before test 2016-09-20 09:00:28 -06:00
raw_skew.c selftests: timers: drop support for !KTEST case 2017-08-22 11:15:59 -06:00
rtctest.c rtc: rtctest: Improve support detection 2017-08-16 17:48:19 -06:00
rtctest_setdate.c tools: timer: add rtctest_setdate 2017-07-09 22:00:54 +02:00
set-2038.c selftests: timers: drop support for !KTEST case 2017-08-22 11:15:59 -06:00
set-tai.c selftests: timers: drop support for !KTEST case 2017-08-22 11:15:59 -06:00
set-timer-lat.c selftests: timers: set-timer-lat: fix hang when std out/err are redirected 2017-09-25 10:09:06 -06:00
set-tz.c selftests: timers: drop support for !KTEST case 2017-08-22 11:15:59 -06:00
skew_consistency.c selftests: timers: drop support for !KTEST case 2017-08-22 11:15:59 -06:00
threadtest.c selftests: timers: drop support for !KTEST case 2017-08-22 11:15:59 -06:00
valid-adjtimex.c selftests: timers: drop support for !KTEST case 2017-08-22 11:15:59 -06:00