select tests, pselect tests: Refactor.
authorBruno Haible <bruno@clisp.org>
Sat, 23 Jul 2011 20:43:38 +0000 (22:43 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 23 Jul 2011 20:46:53 +0000 (22:46 +0200)
commit466449b04ceeb8c245a7e364f9c2c812a5259c8f
tree19b08a65341e9dd752ae920356fa5ed0736c511b
parenta515e805ed703ceafa32c3ecfd0d37d962d752de
select tests, pselect tests: Refactor.

* tests/test-select.h: New file, extracted from tests/test-select.c.
(select_fn): New type.
(test, do_select, do_select_nowait, do_select_wait, test_tty,
test_connect_first, test_accept_first, test_pair, test_socket_pair,
test_pipe): Add my_select argument.
(test_function): Renamed from main. Add my_select argument.
* tests/test-select.c: Move most code to tests/test-select.h. Include
test-select.h.
* modules/select-tests (Files): Add tests/test-select.h.
* tests/test-pselect.c: Include test-select.h instead of test-select.c.
(my_select, main): New functions.
* modules/pselect-tests (Files): Add tests/test-select.h,
tests/macros.h, tests/signature.h.
(Depends-on): Remove select-tests. Add dependencies of test-select.h.
(configure.ac): Check for <sys/wait.h>.
ChangeLog
modules/pselect-tests
modules/select-tests
tests/test-pselect.c
tests/test-select.c
tests/test-select.h [new file with mode: 0644]