strace cann't trace time() system call on x86_64

2016-10-14 Thread ChenJingPiao
Version:strace-4.14, strace-4.13, strace-4.5.20 Environment: ubuntu 16.04.1 LTS x86_64 I use strace to trace a program with time() system call, but it not print time() system call. I also do the same test on ubuntu 14.04 LTS i386, it can trace time() system call. I can find the time() system in

Re: strace cann't trace time() system call on x86_64

2016-10-14 Thread Eugene Syromyatnikov
On Fri, Oct 14, 2016 at 8:35 AM, ChenJingPiao wrote: > Version:strace-4.14, strace-4.13, strace-4.5.20 > Environment: ubuntu 16.04.1 LTS x86_64 > > I use strace to trace a program with time() system call, > but it not print time() system call. I also do the same > test on ubuntu 14.04 LTS i386, it

[PATCH 02/15] tests: Move LL_PAIR and LL_VAL_TO_PAIR macros to tests.h

2016-10-14 Thread Eugene Syromyatnikov
* fadvise.h (LL_PAIR, LL_VAL_TO_PAIR): Move it ... * tests.h: ... here. --- tests/fadvise.h |7 --- tests/tests.h |7 +++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/fadvise.h b/tests/fadvise.h index bc79091..61f561d 100644 --- a/tests/fadvise.h +++ b/tes

[PATCH 04/15] tests: Move ARG_STR and similar macros to tests.h

2016-10-14 Thread Eugene Syromyatnikov
* tests/add_key.c (_STR, ARG_STR): Moved to tests.h. * tests/ioctl_dm.c (ARG_STR): Likewise. * tests/keyctl.c (ARG_STR): Likewise. * tests/perf_event_open_verbose.c (ARG_STR, ARG_ULL_STR): Likewise. * tests/quotactl.h (ARG_STR): Likewise. * tests/request_key.c (ARG_STR): Likewise. * tests/tests.h:

[PATCH 03/15] tests: Check decoding of lookup_dcookie syscall

2016-10-14 Thread Eugene Syromyatnikov
* tests/lookup_dcookie.c: New file. * tests/lookup_dcookie.test: New test. * tests/.gitignore: Add lookup_dcookie. * tests/Makefile.am (check_PROGRAMS): Likewise. (DECODER_TESTS): Add lookup_dcookie.test. --- tests/.gitignore |1 + tests/Makefile.am |2 + tests/lookup_dcoo

[PATCH 05/15] xlat: Use IN_* prefix for inotify_init1 flag constants

2016-10-14 Thread Eugene Syromyatnikov
* xlat/inotify_init_flags.in: Replace O_* prefix with IN_* prefix for O_NONBLOCK, O_CLOEXEC constants. --- xlat/inotify_init_flags.in |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xlat/inotify_init_flags.in b/xlat/inotify_init_flags.in index fb0338b..45d08bb 100644 ---

[PATCH 01/15] tests: iporio_get/ioprio_set test added

2016-10-14 Thread Eugene Syromyatnikov
* tests/.gitignore: Add ioprio. * tests/Makefile.am (check_PROGRAMS): Likewise. (DECODER_TESTS): Add ioprio.test. * tests/ioprio.c: New file. * tests/ioprio.test: Likewise. --- tests/.gitignore |1 + tests/Makefile.am |2 ++ tests/ioprio.c| 104 +++

[PATCH 00/15] Various misc tests

2016-10-14 Thread Eugene Syromyatnikov
Hello. This patchset adds tests for inotify_add_watch, inotify_init1, inotify_rm_watch, ioprio_get, ioprio_set, kcmp, lookup_dcookie, process_vm_readv, process_vm_writev syscalls. Eugene Syromyatnikov (15): tests: iporio_get/ioprio_set test added tests: Move LL_PAIR and LL_VAL_TO_PAIR macros

[PATCH 06/15] tests: Add inotify checks

2016-10-14 Thread Eugene Syromyatnikov
* tests/.gitignore: Add inotify, inotify_init1. * tests/Makefile.am (check_PROGRAMS): Likewise. (DECODER_TESTS): Add inotify.test, inotify_init1.test. * tests/inotify.c: New file. * tests/inotify.test: Likewise. * tests/inotify_init1.c: Likewise. * tests/inotify_init1.test: Likewise. --- tests/.gi

[PATCH 08/15] process_vm: Print pid argument as int

2016-10-14 Thread Eugene Syromyatnikov
* process_vm.c (SYS_FUNC(process_vm_readv), SYS_FUNC(process_vm_writev)): change conversion specifier for pid argument from "%ld" to "%d". --- process_vm.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/process_vm.c b/process_vm.c index 0a9dcd2..03e7594 100644 --- a/pro

[PATCH 09/15] v4l2: check for verbose flag in umoven_or_printaddr_ignore_syserror

2016-10-14 Thread Eugene Syromyatnikov
This change makes behaviour of umoven_or_printaddr_ignore_syserror in line with umoven_or_printaddr when verbose flag is disabled. * v4l2.c (umoven_or_printaddr_ignore_syserror): Simply call printaddr when verbose flag is unset. --- v4l2.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH 07/15] tests: Add kcmp syscall decoding check

2016-10-14 Thread Eugene Syromyatnikov
* tests/kcmp.c: New file. * tests/kcmp.test: New test. * tests/.gitignore: Add kcmp. * tests/Makefile.am (check_PROGRAMS): Likewise. (DECODER_TESTS): Add kcmp.test. --- tests/.gitignore |1 + tests/Makefile.am |2 + tests/kcmp.c | 106

[PATCH 12/15] tests: Update preadv test in order to reflect changed behaviour

2016-10-14 Thread Eugene Syromyatnikov
Since iovecs themselves are printed evan syscall has failed now, test is updated to reflect this. It is notable, though, that this is the only place where this case is checked. * tests/preadv.c: Update output for the case when preadv with singe-item iovec failed. --- tests/preadv.c |3 ++- 1

[PATCH 14/15] process_vm: Remove syserror check for iovec printing

2016-10-14 Thread Eugene Syromyatnikov
This check had been done by print_array inside tprint_iov anyway. * process_vm.c (SYS_FUNC(process_vm_readv)): Use tprint_iov_upto for printing local_iov; do not check for syserror, provide decode_iov parameter to tprint_iov{,_upto} based on its value instead. --- process_vm.c | 17 +---

[PATCH 11/15] io: Use umoven_or_printaddr_ignore_syserror as umove function in tprint_iov_upto

2016-10-14 Thread Eugene Syromyatnikov
This enables printing of iovec arrays even in case of failed syscall (failed syscall doesn't mean that iovec itself is inaccessible and useless). One caveat here is that we should explicitly provide proper IOV_DECODE_* value based on syserror value in case printing is performed on exiting; we can't

[PATCH 15/15] tests: Add process_vm_readv, process_vm_writev syscalls decoding checks

2016-10-14 Thread Eugene Syromyatnikov
* tests/.gitignore: Add process_vm_readv, process_vm_writev. * tests/Makefile.am (check_PROGRAMS): Likewise. (DECODER_TESTS): Add process_vm_readv.test, process_vm_writev.test. (EXTRA_DIST): Add process_vm_readv_writev.c. * tests/process_vm_readv.c: New file. * tests/process_vm_readv.test: Likewise

[PATCH 10/15] Move umoven_or_printaddr_ignore_syserror to util.c

2016-10-14 Thread Eugene Syromyatnikov
* defs.h (umoven_or_printaddr_ignore_syserror): New declaration. * v4l2.c (umoven_or_printaddr_ignore_syserror): Move it ... * util.c (umoven_or_printaddr_ignore_syserror): ... here. --- defs.h |3 +++ util.c | 11 +++ v4l2.c | 11 --- 3 files changed, 14 insertions(+), 11

[PATCH 13/15] process_vm: Use getarg_ull for local_iovcnt, renote_iovcnt, flags parameters

2016-10-14 Thread Eugene Syromyatnikov
These parameters are of kernel_ulong_t type. * process_vm.c (SYS_FUNC(process_vm_readv)): Use getarg_ull for local_iovcnt, renote_iovcnt, flags parameters. (SYS_FUNC(process_vm_writev)): Likewise. --- process_vm.c | 24 1 file changed, 16 insertions(+), 8 deletions(-)