]>
granicus.if.org Git - strace/log
Dmitry V. Levin [Wed, 6 Jan 2016 12:03:37 +0000 (12:03 +0000)]
tests/getdents64.c: use libtests
* tests/getdents64.c: Use SKIP_MAIN_UNDEFINED.
(main): Use perror_msg_and_skip.
Dmitry V. Levin [Wed, 6 Jan 2016 12:02:55 +0000 (12:02 +0000)]
tests/getdents.c: use libtests
* tests/getdents.c: Use SKIP_MAIN_UNDEFINED.
(main): Use perror_msg_and_skip.
Dmitry V. Levin [Wed, 6 Jan 2016 11:59:58 +0000 (11:59 +0000)]
tests/ipc_shm.c: use libtests
* tests/ipc_shm.c (cleanup): New function.
(main): Use it and perror_msg_and_skip.
Dmitry V. Levin [Wed, 6 Jan 2016 11:59:29 +0000 (11:59 +0000)]
tests/ipc_sem.c: use libtests
* tests/ipc_sem.c (cleanup): New function.
(main): Use it and perror_msg_and_skip.
Dmitry V. Levin [Wed, 6 Jan 2016 11:59:06 +0000 (11:59 +0000)]
tests/ipc_msg.c: use libtests
* tests/ipc_msg.c (cleanup): New function.
(main): Use it and perror_msg_and_skip.
Dmitry V. Levin [Wed, 6 Jan 2016 11:55:13 +0000 (11:55 +0000)]
tests/ipc_msgbuf.c: use libtests
* tests/ipc_msgbuf.c (cleanup): New function.
(main): Use it and perror_msg_and_skip.
Dmitry V. Levin [Wed, 6 Jan 2016 11:52:43 +0000 (11:52 +0000)]
tests/mq.c: use libtests
* tests/mq.c: Use SKIP_MAIN_UNDEFINED.
(main): Use perror_msg_and_skip.
Dmitry V. Levin [Wed, 6 Jan 2016 11:49:27 +0000 (11:49 +0000)]
tests/utimensat.c: use libtests
* tests/utimensat.c: Use SKIP_MAIN_UNDEFINED.
(main): Use assert and perror_msg_and_skip.
Dmitry V. Levin [Wed, 6 Jan 2016 11:44:32 +0000 (11:44 +0000)]
tests/ppoll.c: use libtests
* tests/ppoll.c (main): Use assert, perror_msg_and_skip,
and perror_msg_and_fail.
Dmitry V. Levin [Wed, 6 Jan 2016 11:43:08 +0000 (11:43 +0000)]
tests/mmsg.c: use libtests
* tests/mmsg.c: Use SKIP_MAIN_UNDEFINED.
(main): Use perror_msg_and_skip.
Dmitry V. Levin [Wed, 6 Jan 2016 11:42:10 +0000 (11:42 +0000)]
tests/ip_mreq.c: use libtests
* tests/ip_mreq.c: Use SKIP_MAIN_UNDEFINED.
(main): Use perror_msg_and_skip.
Dmitry V. Levin [Wed, 6 Jan 2016 11:40:00 +0000 (11:40 +0000)]
tests/ioctl.c: use libtests
* tests/ioctl.c: Use SKIP_MAIN_UNDEFINED.
(main): Use %m printf format specifier.
Dmitry V. Levin [Wed, 6 Jan 2016 11:38:05 +0000 (11:38 +0000)]
tests/pipe.c: use libtests
* tests/pipe.c: Use SKIP_MAIN_UNDEFINED.
(main): Use perror_msg_and_fail and perror_msg_and_skip.
Dmitry V. Levin [Wed, 6 Jan 2016 11:36:54 +0000 (11:36 +0000)]
tests/getrandom.c: use libtests
* tests/getrandom.c: Use SKIP_MAIN_UNDEFINED.
(main): Use perror_msg_and_skip.
Dmitry V. Levin [Wed, 6 Jan 2016 11:35:23 +0000 (11:35 +0000)]
tests/signalfd.c: use libtests
* tests/signalfd.c: Use SKIP_MAIN_UNDEFINED.
(main): Use perror_msg_and_skip.
Dmitry V. Levin [Wed, 6 Jan 2016 11:33:13 +0000 (11:33 +0000)]
tests/pc.c: use libtests
* tests/pc.c (main): Use assert, get_page_size, perror_msg_and_fail,
and perror_msg_and_skip.
Dmitry V. Levin [Wed, 6 Jan 2016 11:31:48 +0000 (11:31 +0000)]
tests/uio.c: use libtests
* tests/uio.c: Use SKIP_MAIN_UNDEFINED.
Dmitry V. Levin [Wed, 6 Jan 2016 11:29:16 +0000 (11:29 +0000)]
tests/bpf.c: use libtests
* tests/bpf.c: Use SKIP_MAIN_UNDEFINED.
(main) Use perror_msg_and_skip.
Dmitry V. Levin [Wed, 6 Jan 2016 11:27:15 +0000 (11:27 +0000)]
tests/aio.c: use libtests
* tests/aio.c: Use SKIP_MAIN_UNDEFINED.
(main) Use perror_msg_and_skip.
Dmitry V. Levin [Wed, 6 Jan 2016 11:25:47 +0000 (11:25 +0000)]
tests/sched_xetattr.c: use libtests
* tests/sched_xetattr.c: Use SKIP_MAIN_UNDEFINED.
(main) Use perror_msg_and_skip.
Dmitry V. Levin [Wed, 6 Jan 2016 11:23:21 +0000 (11:23 +0000)]
tests/wait.c: use libtests
* tests/wait.c (main): Use perror_msg_and_fail.
Dmitry V. Levin [Wed, 6 Jan 2016 11:22:59 +0000 (11:22 +0000)]
tests/vfork-f.c: use libtests
* tests/vfork-f.c (main): Use assert and perror_msg_and_fail.
Dmitry V. Levin [Wed, 6 Jan 2016 11:22:25 +0000 (11:22 +0000)]
tests/fork-f.c: use libtests
* tests/fork-f.c (main): Use assert and perror_msg_and_fail.
Dmitry V. Levin [Wed, 6 Jan 2016 10:01:20 +0000 (10:01 +0000)]
tests/userfaultfd.c: use libtests
* tests/userfaultfd.c: Use SKIP_MAIN_UNDEFINED.
(main): Use assert.
Dmitry V. Levin [Wed, 6 Jan 2016 10:00:44 +0000 (10:00 +0000)]
tests/mlock2.c: use libtests
* tests/mlock2.c: Use SKIP_MAIN_UNDEFINED.
(main): Use assert.
Dmitry V. Levin [Wed, 6 Jan 2016 09:59:46 +0000 (09:59 +0000)]
tests/membarrier.c: use libtests
* tests/membarrier.c: Use SKIP_MAIN_UNDEFINED.
(main): Use assert.
Dmitry V. Levin [Wed, 6 Jan 2016 09:56:09 +0000 (09:56 +0000)]
tests/nanosleep.c: use libtests
* tests/nanosleep.c (main): Use assert, perror_msg_and_fail,
and perror_msg_and_skip.
Dmitry V. Levin [Wed, 6 Jan 2016 09:51:37 +0000 (09:51 +0000)]
tests/timerfd_xettime.c: use libtests
* tests/timerfd_xettime.c: Use SKIP_MAIN_UNDEFINED.
(main): Use perror_msg_and_skip.
Dmitry V. Levin [Wed, 6 Jan 2016 09:50:44 +0000 (09:50 +0000)]
tests/timer_xettime.c: use libtests
* tests/timer_xettime.c: Use SKIP_MAIN_UNDEFINED.
(main): Use perror_msg_and_skip.
Dmitry V. Levin [Wed, 6 Jan 2016 09:49:32 +0000 (09:49 +0000)]
tests/timer_create.c: use libtests
* tests/timer_create.c: Use SKIP_MAIN_UNDEFINED.
(main): Use perror_msg_and_skip.
Dmitry V. Levin [Wed, 6 Jan 2016 09:48:05 +0000 (09:48 +0000)]
tests/clock_xettime.c: use libtests
* tests/clock_xettime.c: Use SKIP_MAIN_UNDEFINED.
(main): Use perror_msg_and_skip.
Dmitry V. Levin [Wed, 6 Jan 2016 09:46:29 +0000 (09:46 +0000)]
tests/clock_nanosleep.c: use libtests
* tests/clock_nanosleep.c (main): Use assert and perror_msg_and_skip.
Dmitry V. Levin [Wed, 6 Jan 2016 09:36:00 +0000 (09:36 +0000)]
tests/truncate64.c: use libtests
* tests/truncate64.c: Use SKIP_MAIN_UNDEFINED.
(main): Use assert and perror_msg_and_skip.
Dmitry V. Levin [Wed, 6 Jan 2016 09:35:39 +0000 (09:35 +0000)]
tests/truncate.c: use libtests
* tests/truncate.c: Use SKIP_MAIN_UNDEFINED.
(main): Use assert and perror_msg_and_skip.
Dmitry V. Levin [Wed, 6 Jan 2016 09:35:23 +0000 (09:35 +0000)]
tests/ftruncate64.c: use libtests
* tests/ftruncate64.c: Use SKIP_MAIN_UNDEFINED.
(main): Use assert and perror_msg_and_skip.
Dmitry V. Levin [Wed, 6 Jan 2016 09:34:30 +0000 (09:34 +0000)]
tests/ftruncate.c: use libtests
* tests/ftruncate.c: Use SKIP_MAIN_UNDEFINED.
(main): Use assert and perror_msg_and_skip.
Dmitry V. Levin [Tue, 5 Jan 2016 23:28:15 +0000 (23:28 +0000)]
tests/llseek.c: use libtests
* tests/llseek.c: Use SKIP_MAIN_UNDEFINED.
(main): Use assert and perror_msg_and_skip.
Dmitry V. Levin [Tue, 5 Jan 2016 23:27:42 +0000 (23:27 +0000)]
tests/lseek.c: use libtests
* tests/lseek.c: Use SKIP_MAIN_UNDEFINED.
(main): Use assert and perror_msg_and_skip.
Dmitry V. Levin [Tue, 5 Jan 2016 23:27:05 +0000 (23:27 +0000)]
tests/readlinkat.c: use libtests
* tests/readlinkat.c: Use SKIP_MAIN_UNDEFINED.
(main): Use perror_msg_and_skip.
Dmitry V. Levin [Tue, 5 Jan 2016 23:26:13 +0000 (23:26 +0000)]
tests/readlink.c: use libtests
* tests/readlink.c: Use SKIP_MAIN_UNDEFINED.
(main): Use perror_msg_and_skip.
Dmitry V. Levin [Tue, 5 Jan 2016 23:18:25 +0000 (23:18 +0000)]
tests/xattr.c: use libtests
* tests/xattr.c: Use SKIP_MAIN_UNDEFINED.
(main): Use perror_msg_and_skip.
Dmitry V. Levin [Tue, 5 Jan 2016 23:17:29 +0000 (23:17 +0000)]
tests/seccomp.c: use libtests
* tests/seccomp.c: Use SKIP_MAIN_UNDEFINED.
(main): Use perror_msg_and_fail and perror_msg_and_skip.
Dmitry V. Levin [Tue, 5 Jan 2016 23:14:25 +0000 (23:14 +0000)]
tests/restart_syscall.c: use libtests
* tests/restart_syscall.c (main): Use assert, perror_msg_and_fail,
and perror_msg_and_skip.
Dmitry V. Levin [Tue, 5 Jan 2016 23:13:41 +0000 (23:13 +0000)]
tests/inet-cmsg.c: use libtests
* tests/inet-cmsg.c (main): Use perror_msg_and_skip.
Dmitry V. Levin [Tue, 5 Jan 2016 23:12:51 +0000 (23:12 +0000)]
tests/eventfd.c: use libtests
* tests/eventfd.c: Use SKIP_MAIN_UNDEFINED.
(main): Use perror_msg_and_skip.
Dmitry V. Levin [Tue, 5 Jan 2016 23:11:48 +0000 (23:11 +0000)]
tests/epoll_create1.c: use libtests
* tests/epoll_create1.c: Use SKIP_MAIN_UNDEFINED.
(main): Use assert and perror_msg_and_skip.
Dmitry V. Levin [Tue, 5 Jan 2016 23:07:59 +0000 (23:07 +0000)]
tests/mmap.c: use libtests
* tests/mmap.c (main): Use get_page_size and perror_msg_and_fail.
Dmitry V. Levin [Tue, 5 Jan 2016 23:06:14 +0000 (23:06 +0000)]
tests/fanotify_mark.c: use libtests
* tests/fanotify_mark.c: Use SKIP_MAIN_UNDEFINED.
Dmitry V. Levin [Tue, 5 Jan 2016 23:04:30 +0000 (23:04 +0000)]
tests/inet-accept-connect-send-recv.c: use libtests
* tests/inet-accept-connect-send-recv.c (main): Use perror_msg_and_skip
and perror_msg_and_fail.
Dmitry V. Levin [Tue, 5 Jan 2016 23:03:26 +0000 (23:03 +0000)]
tests/net-accept-connect.c: use libtests
* tests/net-accept-connect.c (main): Use perror_msg_and_skip
and perror_msg_and_fail.
Dmitry V. Levin [Tue, 5 Jan 2016 23:02:21 +0000 (23:02 +0000)]
tests/unix-pair-send-recv.c: use libtests
* tests/unix-pair-send-recv.c (main): Use perror_msg_and_skip
and perror_msg_and_fail.
Dmitry V. Levin [Tue, 5 Jan 2016 22:56:30 +0000 (22:56 +0000)]
tests/xselect.c: use libtests
* tests/xselect.c (main): Use assert, perror_msg_and_fail,
and perror_msg_and_skip.
Dmitry V. Levin [Tue, 5 Jan 2016 22:55:05 +0000 (22:55 +0000)]
tests/pselect6.c: use libtests
* tests/pselect6.c: Use SKIP_MAIN_UNDEFINED.
(main): Use assert, perror_msg_and_fail, and perror_msg_and_skip.
Dmitry V. Levin [Tue, 5 Jan 2016 22:53:28 +0000 (22:53 +0000)]
tests/oldselect.c: use libtests
* tests/oldselect.c: Use SKIP_MAIN_UNDEFINED.
(main): Use perror_msg_and_fail and perror_msg_and_skip.
Dmitry V. Levin [Tue, 5 Jan 2016 22:52:39 +0000 (22:52 +0000)]
tests/select.c: use libtests
* tests/select.c: Use SKIP_MAIN_UNDEFINED.
Dmitry V. Levin [Tue, 5 Jan 2016 22:51:44 +0000 (22:51 +0000)]
tests/_newselect.c: use libtests
* tests/_newselect.c: Use SKIP_MAIN_UNDEFINED.
Dmitry V. Levin [Tue, 5 Jan 2016 22:41:28 +0000 (22:41 +0000)]
tests/fstatat.c: use libtests
* tests/fstatat.c: Use SKIP_MAIN_UNDEFINED.
Dmitry V. Levin [Tue, 5 Jan 2016 22:40:51 +0000 (22:40 +0000)]
tests/newfstatat.c: use libtests
* tests/newfstatat.c: Use SKIP_MAIN_UNDEFINED.
Dmitry V. Levin [Tue, 5 Jan 2016 22:40:17 +0000 (22:40 +0000)]
tests/fstatat64.c: use libtests
* tests/fstatat64.c: Use SKIP_MAIN_UNDEFINED.
Dmitry V. Levin [Tue, 5 Jan 2016 22:37:42 +0000 (22:37 +0000)]
tests/xstatx.c: use libtests
* tests/xstatx.c: Use SKIP_MAIN_UNDEFINED.
Dmitry V. Levin [Tue, 5 Jan 2016 22:35:52 +0000 (22:35 +0000)]
tests/stat64.c: use libtests
* tests/stat64.c: Use SKIP_MAIN_UNDEFINED.
Dmitry V. Levin [Tue, 5 Jan 2016 22:35:11 +0000 (22:35 +0000)]
tests/stat.c: use libtests
* tests/stat.c: Use SKIP_MAIN_UNDEFINED.
Dmitry V. Levin [Tue, 5 Jan 2016 22:34:30 +0000 (22:34 +0000)]
tests/lstat64.c: use libtests
* tests/lstat64.c: Use SKIP_MAIN_UNDEFINED.
Dmitry V. Levin [Tue, 5 Jan 2016 22:33:26 +0000 (22:33 +0000)]
tests/lstat.c: use libtests
* tests/lstat.c: Use SKIP_MAIN_UNDEFINED.
Dmitry V. Levin [Tue, 5 Jan 2016 22:32:37 +0000 (22:32 +0000)]
tests/fstat64.c: use libtests
* tests/fstat64.c: Use SKIP_MAIN_UNDEFINED.
Dmitry V. Levin [Tue, 5 Jan 2016 22:31:46 +0000 (22:31 +0000)]
tests/fstat.c: use libtests
* tests/fstat.c: Use SKIP_MAIN_UNDEFINED.
Dmitry V. Levin [Tue, 5 Jan 2016 22:28:51 +0000 (22:28 +0000)]
tests/statfs.c: use libtests
* tests/statfs.c (main): Use perror_msg_and_fail.
Dmitry V. Levin [Mon, 4 Jan 2016 23:59:16 +0000 (23:59 +0000)]
tests/xettimeofday.c: use libtests
* tests/xettimeofday.c (main): Use assert and perror_msg_and_skip.
Dmitry V. Levin [Mon, 4 Jan 2016 23:58:19 +0000 (23:58 +0000)]
tests/utime.c: use libtests
* tests/utime.c (main): Use assert and perror_msg_and_skip.
Dmitry V. Levin [Mon, 4 Jan 2016 23:56:03 +0000 (23:56 +0000)]
tests/filter-unavailable.c: use libtests
* tests/filter-unavailable.c (main): Use perror_msg_and_fail.
Dmitry V. Levin [Mon, 4 Jan 2016 23:53:31 +0000 (23:53 +0000)]
tests/scm_rights.c: use libtests
* tests/scm_rights.c (main): Use perror_msg_and_fail and perror_msg_and_skip.
Dmitry V. Levin [Mon, 4 Jan 2016 23:51:11 +0000 (23:51 +0000)]
tests/caps.c: use libtests
* tests/caps.c (main): Use perror_msg_and_skip.
Dmitry V. Levin [Mon, 4 Jan 2016 23:49:32 +0000 (23:49 +0000)]
tests/rt_sigqueueinfo.c: use libtests
* tests/rt_sigqueueinfo.c (main): Use assert and perror_msg_and_skip.
Dmitry V. Levin [Mon, 4 Jan 2016 23:47:59 +0000 (23:47 +0000)]
tests/umount.c: use libtests
* tests/umount.c: Use SKIP_MAIN_UNDEFINED.
(main): Use perror_msg_and_fail.
Dmitry V. Levin [Mon, 4 Jan 2016 23:47:59 +0000 (23:47 +0000)]
tests/umount2.c: use libtests
* tests/umount2.c (main): Use perror_msg_and_fail.
Dmitry V. Levin [Mon, 4 Jan 2016 23:44:20 +0000 (23:44 +0000)]
tests/times.c: use libtests
* tests/times.c (main): Use perror_msg_and_fail and perror_msg_and_skip.
Dmitry V. Levin [Mon, 4 Jan 2016 23:43:09 +0000 (23:43 +0000)]
tests/times-fail.c: use assert
* tests/times-fail.c (main): Use assert.
Dmitry V. Levin [Mon, 4 Jan 2016 23:41:27 +0000 (23:41 +0000)]
tests/memfd_create.c: use libtests
* tests/memfd_create.c: Use SKIP_MAIN_UNDEFINED.
Dmitry V. Levin [Mon, 4 Jan 2016 23:40:24 +0000 (23:40 +0000)]
tests/execveat.c: use libtests
* tests/execveat.c: Use SKIP_MAIN_UNDEFINED.
Dmitry V. Levin [Mon, 4 Jan 2016 23:38:19 +0000 (23:38 +0000)]
tests/xetitimer.c: use libtests
* tests/xetitimer.c (main): Use perror_msg_and_skip.
Dmitry V. Levin [Mon, 4 Jan 2016 23:36:00 +0000 (23:36 +0000)]
tests/sysinfo.c: use libtests
* tests/sysinfo.c (main): Use perror_msg_and_skip.
Dmitry V. Levin [Mon, 4 Jan 2016 23:34:00 +0000 (23:34 +0000)]
tests/sigaltstack.c: use libtests
* tests/sigaltstack.c (main): Use perror_msg_and_skip.
Dmitry V. Levin [Mon, 4 Jan 2016 23:31:09 +0000 (23:31 +0000)]
tests/adjtimex.c: use libtests
* tests/adjtimex.c (main): Use perror_msg_and_skip.
Dmitry V. Levin [Sun, 3 Jan 2016 22:09:54 +0000 (22:09 +0000)]
tests/xet_robust_list.c: use libtests
* tests/xet_robust_list.c: Use SKIP_MAIN_UNDEFINED.
(main): Use perror_msg_and_skip and tail_alloc.
Dmitry V. Levin [Sun, 3 Jan 2016 22:07:40 +0000 (22:07 +0000)]
tests/umovestr2.c: use libtests
* tests/umovestr2.c (main): Use get_page_size and tail_alloc.
Dmitry V. Levin [Sun, 3 Jan 2016 21:58:52 +0000 (21:58 +0000)]
tests/umovestr.c: use libtests
* tests/umovestr.c (main): Use perror_msg_and_skip and tail_alloc.
Dmitry V. Levin [Sun, 3 Jan 2016 21:56:05 +0000 (21:56 +0000)]
tests/time.c: use libtests
* tests/time.c: Use SKIP_MAIN_UNDEFINED.
(main): Use perror_msg_and_skip and tail_alloc.
Dmitry V. Levin [Sun, 3 Jan 2016 21:54:31 +0000 (21:54 +0000)]
tests/sendfile64.c: use libtests
* tests/sendfile64.c: Use SKIP_MAIN_UNDEFINED.
(main): Use assert, perror_msg_and_fail, perror_msg_and_skip,
and tail_alloc.
Dmitry V. Levin [Sun, 3 Jan 2016 21:52:58 +0000 (21:52 +0000)]
tests/sendfile.c: use libtests
* tests/sendfile.c: Use SKIP_MAIN_UNDEFINED.
(main): Use assert, perror_msg_and_fail, perror_msg_and_skip,
and tail_alloc.
Dmitry V. Levin [Sat, 2 Jan 2016 13:28:43 +0000 (13:28 +0000)]
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
Dmitry V. Levin [Sat, 2 Jan 2016 12:05:14 +0000 (12:05 +0000)]
tests: introduce libtests
Introduce tests/libtests.a with common functions for use in tests.
* tests/tests.h: New file.
* tests/error_msg.c: Likewise.
* tests/tail_alloc.c: Likewise.
* tests/get_page_size.c: Likewise.
* tests/Makefile.am (libtests_a_SOURCES, libtests_a_CPPFLAGS,
check_LIBRARIES, LDADD): New variables.
(clock_xettime_LDADD, filter_unavailable_LDADD, mq_LDADD,
pc_LDADD, times_LDADD): Add $(LDADD).
* tests/.gitignore: Add libtests.a.
Dmitry V. Levin [Fri, 1 Jan 2016 23:09:02 +0000 (23:09 +0000)]
tests: enable strace-k.test only for --with-libunwind configurations
Also, since -k option does not support multiple personalities,
add strace-k.test to XFAIL_TESTS when running mpers tests.
* tests/Makefile.am (MPERS_NAME, LIBUNWIND_TESTS, XFAIL_TESTS_,
XFAIL_TESTS_m32, XFAIL_TESTS_mx32, XFAIL_TESTS): New variables.
[USE_LIBUNWIND] (LIBUNWIND_TESTS): Add strace-k.test.
(TESTS): Replace strace-k.test with $(LIBUNWIND_TESTS).
* bootstrap: Substitute MPERS_NAME variable in tests-*/Makefile.am.
* tests/strace-k.test: Do not check for -k option availability.
Dmitry V. Levin [Thu, 31 Dec 2015 14:19:41 +0000 (14:19 +0000)]
Move gcc compat macros to gcc_compat.h
* defs.h: Include "gcc_compat.h".
(GNUC_PREREQ, ATTRIBUTE_NORETURN, ATTRIBUTE_FORMAT,
ATTRIBUTE_ALIGNED, ATTRIBUTE_PACKED, ATTRIBUTE_MALLOC,
ATTRIBUTE_NOINLINE, ATTRIBUTE_ALLOC_SIZE): Move ...
* gcc_compat.h: ... here.
* Makefile.am (strace_SOURCES): Add gcc_compat.h.
Dmitry V. Levin [Thu, 31 Dec 2015 14:15:59 +0000 (14:15 +0000)]
Move defs.h from noinst_HEADERS to strace_SOURCES
* Makefile.am (noinst_HEADERS): Move defs.h ...
(strace_SOURCES): ... here.
Dmitry V. Levin [Wed, 30 Dec 2015 23:28:35 +0000 (23:28 +0000)]
test: remove fork.c and vfork.c
These manual tests are obsoleted by fork-f.test and vfork-f.test.
* test/fork.c: Remove.
* test/vfork.c: Remove.
* test/Makefile (PROGS): Remove fork and vfork.
* test/.gitignore: Remove fork and vfork.
Dmitry V. Levin [Wed, 30 Dec 2015 23:00:43 +0000 (23:00 +0000)]
tests: add fork-f.test and vfork-f.test
Check how strace -f follows fork and vfork syscalls.
* tests/fork-f.c: New file.
* tests/fork-f.test: New test.
* tests/vfork-f.c: New file.
* tests/vfork-f.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add fork-f and vfork-f.
(TESTS): Add fork-f.test and vfork-f.test.
* tests/.gitignore: Add fork-f and vfork-f.
Dmitry V. Levin [Tue, 29 Dec 2015 01:06:39 +0000 (01:06 +0000)]
Set SYSCALL_NEVER_FAILS flag for getpid, getppid and gettid syscall
* linux/*/syscallent*.h (getpid, getppid, gettid): Set NF flag.
Dmitry V. Levin [Mon, 28 Dec 2015 00:44:47 +0000 (00:44 +0000)]
Set SYSCALL_NEVER_FAILS flag for umask syscall
Linux kernel always ANDs umask argument with 0700 and therefore
this syscall never fails.
* linux/*/syscallent*.h (umask): Set NF flag.
Dmitry V. Levin [Sun, 27 Dec 2015 00:18:51 +0000 (00:18 +0000)]
alpha, ia64, mips, nios2, powerpc, sparc: always check for syscall error
On architectures that use dedicated registers to report syscall errors,
check for syscall error condition regardless of SYSCALL_NEVER_FAILS flag
in the syscall entry. On architectures that use negated errno
semantics, there is no way to distinguish a syscall error from a valid
return code that looks like a syscall error, and the check for
SYSCALL_NEVER_FAILS flag remains the only way to tell one case
from another.
* linux/alpha/get_error.c (get_error): Ignore check_errno.
* linux/ia64/get_error.c: Likewise.
* linux/mips/get_error.c: Likewise.
* linux/nios2/get_error.c: Likewise.
* linux/powerpc/get_error.c: Likewise.
* linux/sparc/get_error.c: Likewise.
* linux/sparc64/get_error.c: Likewise.
Dmitry V. Levin [Sun, 27 Dec 2015 00:18:35 +0000 (00:18 +0000)]
Handle unlikely errors from personality syscall
Despite being marked as SYSCALL_NEVER_FAILS, personality syscall still
might report a failure on some architectures due to obscure kernel
bugs. Check for this unlikely case and let users know that their
kernel has gone bananas.
* personality.c (SYS_FUNC(personality)): Do not parse syscall return
value in case of syserror.