about summary refs log tree commit diff
path: root/misc/tst-select.c
Commit message (Collapse)AuthorAgeFilesLines
* misc: Fix tst-select timeout handling (BZ#27648)Adhemerval Zanella2021-03-261-30/+55
| | | | | | | | Instead of polling the stderr, create two pipes and fork to check if child timeout as expected similar to tst-pselect.c. Also lower the timeout value. Checked on x86_64-linux-gnu.
* tst: Provide test for selectLukasz Majewski2021-03-231-0/+71
This change adds new test to assess select()'s timeout related functionality (the rdfs set provides valid fd - stderr - but during normal program operation there is no data to be read, so one just waits for timeout). To be more specific - two use cases are checked: - if select() times out immediately when passed struct timeval has zero values of tv_usec and tv_sec. - if select() times out after timeout specified in passed argument Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>