Commit Graph

5 Commits

Author SHA1 Message Date
fa63468f55 tests/restart_syscall.c: use libtests
* tests/restart_syscall.c (main): Use assert, perror_msg_and_fail,
and perror_msg_and_skip.
2016-01-05 23:14:25 +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
703a7166ae tests/restart_syscall: add a workaround for old arm kernels
As arm kernels used to overwrite ARM_r0 with -EINTR after
ERESTART_RESTARTBLOCK, update regexp to workaround this.

* tests/restart_syscall.c (main) [__arm__]: Add 0xfffffffc as a valid
alternative value for the first argument of restarted nanosleep syscall.
2015-12-13 01:12:55 +00:00
5421855219 tests: skip restart_syscall.test on x32
The syscall number of restart_syscall returned by the kernel in case
of ERESTART_RESTARTBLOCK is broken on x32 from the beginning, see
https://lkml.org/lkml/2015/11/30/790

Until that improves, skip the test on x32.

* tests/restart_syscall.c (main) [__x86_64__ && __ILP32__]: Return 77.
2015-12-04 16:57:23 +00:00
640623c41e tests: rewrite restart_syscall in C
* tests/restart_syscall.c: New file.
* tests/restart_syscall.expected: Remove.
* tests/restart_syscall_unknown.expected: Remove.
* tests/restart_syscall.test: Update to use restart_syscall.
* tests/Makefile.am (check_PROGRAMS): Add restart_syscall.
(EXTRA_DIST): Remove restart_syscall.expected
and restart_syscall_unknown.expected.
* tests/.gitignore: Add restart_syscall.
2015-09-19 04:04:48 +03:00