Commit Graph

10 Commits

Author SHA1 Message Date
fa5e5d9854 tests: do not include <assert.h> unnecessarily
Automatically change tests/*.c files using the following script:

for f in tests/*.c; do
	grep -q '\<assert(' "$f" ||
		sed -i '/# *include *<assert\.h>/d' "$f"
done
2016-04-21 22:05:57 +00:00
96a9ff5746 tests: do not include <errno.h> unnecessarily
Automatically change tests/*.c files using the following script:

for f in tests/*.c; do
	grep -Fv errno.h "$f" |
	grep -Ewq '(si_)?errno|SOCK_FILTER_DENY_SYSCALL' ||
		sed -i '/# *include *<errno\.h>/d' "$f"
done
2016-04-21 22:05:57 +00:00
7529683349 tests/epoll_create1.c: cleanup
* tests/epoll_create1.c (main): Use errno2name, stop using assert.
2016-04-21 20:52:42 +00:00
7a06960ff4 tests/epoll_create1.c: extend for the case of ENOSYS
* epoll_create1.c: Make the test work in case of epoll_create1
returning ENOSYS.
2016-04-10 23:05:18 +00:00
6267e4b0e3 tests: convert epoll_create1.test from match_grep to match_diff
* tests/epoll_create1.c (main): Print expected output.
* tests/epoll_create1.test: Use match_diff instead of match_grep.
* tests/epoll_create1.expected: Remove.
* tests/Makefile.am (EXTRA_DIST): Remove epoll_create1.expected.
2016-01-06 16:08:07 +00:00
69fe020a23 tests/epoll_create1.c: use libtests
* tests/epoll_create1.c: Use SKIP_MAIN_UNDEFINED.
(main): Use assert and perror_msg_and_skip.
2016-01-05 23:11:48 +00:00
0c8853c3c3 tests: include tests.h instead of config.h
Automatically edit tests/*.c files using the following perl one-liner:

perl -0777 -pi -e \
's/#ifdef HAVE_CONFIG_H\n# include "config\.h"\n#endif\n*/#include "tests.h"\n/' \
tests/*.c
2016-01-05 23:17:11 +00:00
38a34c9349 Add copyright headers to some files which lack them
Before this change, all files that exist since 20th century had
copyright headers, while most files that appeared later didn't.  This
change fixes the inconsistency by adding missing copyright headers.

It doesn't mean that copyright headers became maintained.  In my view,
git history provides much better information on this subject and is much
more accurate than copyright headers.
2015-12-17 17:56:48 +00:00
857adac3a5 tests: fix build on systems that lack O_CLOEXEC definition
* tests/epoll_create1.c (main): Check that O_CLOEXEC is defined.
* tests/eventfd.c (main): Likewise.
* tests/signalfd.c (main): Likewise.
2015-08-26 21:05:17 +00:00
bf62c1b52d epoll_create1: fix flags decoding
* xlat/epollflags.in: Remove EPOLL_NONBLOCK, provide fallback definition
for EPOLL_CLOEXEC.
* tests/epoll_create1.c: New file.
* tests/epoll_create1.expected: Likewise.
* tests/epoll_create1.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add epoll_create1.
(TESTS): Add epoll_create1.test.
(EXTRA_DIST): Add epoll_create1.expected.
* tests/.gitignore: Add epoll_create1.
2015-08-02 00:10:48 +00:00