Commit Graph

5 Commits

Author SHA1 Message Date
595fc10f11 tests: extend coverage of struct sigevent
* tests/timer_create.c (main): Check decoding of NULL struct sigevent
pointer.  Check decoding of invalid sigev_notify value.
2016-02-08 18:26:46 +00:00
e714b87064 Fix struct sigevent decoding for musl
Do not rely on "struct sigevent.__pad" being located at the same address
as "struct sigevent.sigev_notify_thread_id", it's not the case with musl
libc.  Do not rely on struct sigevent definition at all to access
sigev_notify_thread_id.

* configure.ac (AC_CHECK_MEMBERS): Remove struct sigevent._sigev_un._pad
and struct sigevent.__pad.
* sigevent.h: New file.
* Makefile.am (strace_SOURCES): Add it.
* print_sigevent.c: Include it.
* print_sigevent.c (struct_sigevent): Remove.
(print_sigevent): Update all struct_sigevent users.
* tests/timer_create.c: Include "sigevent.h".
(main): Use struct_sigevent instead of struct sigevent,
all struct sigevent clients changed.
2016-01-12 03:07:39 +00:00
21bbc14575 tests/timer_create.c: use libtests
* tests/timer_create.c: Use SKIP_MAIN_UNDEFINED.
(main): Use perror_msg_and_skip.
2016-01-06 09:49:32 +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
b8f0c9286a Enhance parser of struct sigevent
* print_sigevent.c (print_sigevent): Always print names
of struct_sigevent fields along with their values.
Print signal name of sigev_signo for those sigev_notify values
that require valid signal numbers.
* tests/timer_create.c: New file.
* tests/timer_create.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add timer_create.
(TESTS): Add timer_create.test.
* tests/.gitignore: Add timer_create.
2015-09-17 13:22:57 +00:00