]> granicus.if.org Git - strace/log
strace
7 years agoAdd copyright headers
Eugene Syromyatnikov [Mon, 22 May 2017 17:14:52 +0000 (19:14 +0200)]
Add copyright headers

7 years agoAdd scripts for automating copyright notices update
Eugene Syromyatnikov [Mon, 1 May 2017 17:10:15 +0000 (19:10 +0200)]
Add scripts for automating copyright notices update

* maint/update_copyright_years.awk: New file.
* maint/update_copyright_years.sh: Likewise.

Co-authored-by: Elvira Khabirova <lineprinter0@gmail.com>
7 years agoFix typos in copyright notices
Eugene Syromyatnikov [Mon, 22 May 2017 16:53:14 +0000 (18:53 +0200)]
Fix typos in copyright notices

7 years agounwind.c: remove non-ASCII character from comment
Eugene Syromyatnikov [Mon, 22 May 2017 17:08:47 +0000 (19:08 +0200)]
unwind.c: remove non-ASCII character from comment

7 years agoRename sys_sig[gs]etmask to sys_s[gs]etmask to match syscall names
Dmitry V. Levin [Sun, 21 May 2017 17:51:01 +0000 (17:51 +0000)]
Rename sys_sig[gs]etmask to sys_s[gs]etmask to match syscall names

* signal.c (SYS_FUNC(sigsetmask)): Rename to SYS_FUNC(ssetmask).
(SYS_FUNC(siggetmask)): Rename to SYS_FUNC(sgetmask).
* linux/arm/syscallent.h (sgetmask, ssetmask): Update sys_func.
* linux/bfin/syscallent.h: Likewise.
* linux/crisv10/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/syscallent-o32.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/powerpc64/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.

7 years agotests: enhance sigsuspend.test
Dmitry V. Levin [Sun, 21 May 2017 14:37:48 +0000 (14:37 +0000)]
tests: enhance sigsuspend.test

* tests/sigsuspend.c (sigtxt): New variable.
(main): Change signal masks to contain all signals except USR1 and USR2.

7 years agoFix compat personality support for old sigsuspend syscall
Dmitry V. Levin [Sat, 20 May 2017 20:17:59 +0000 (20:17 +0000)]
Fix compat personality support for old sigsuspend syscall

* signal.c (sprint_old_sigmask_val): New function.
(tprint_old_sigmask_val): New macro.
(SYS_FUNC(sigsuspend)): Use it.

7 years agoMove errnoent.sh, signalent.sh, and syscallent.sh to maint subdirectory
Dmitry V. Levin [Tue, 16 May 2017 02:11:35 +0000 (02:11 +0000)]
Move errnoent.sh, signalent.sh, and syscallent.sh to maint subdirectory

Also do not include them into release tarballs.  These files are
intended for developers who are expected to use a git repository.

* errnoent.sh: Move to maint subdirectory.
* signalent.sh: Likewise.
* syscallent.sh: Likewise.
* HACKING-scripts: Update.
* Makefile.am (EXTRA_DIST): Remove errnoent.sh, signalent.sh,
and syscallent.sh.

7 years agoDo not include maint subdirectory into release tarballs
Dmitry V. Levin [Tue, 16 May 2017 02:11:35 +0000 (02:11 +0000)]
Do not include maint subdirectory into release tarballs

These files are intended for developers who are expected to use
a git repository.

* Makefile.am (EXTRA_DIST): Remove maint/ioctls_gen.sh,
maint/ioctls_hex.sh, maint/ioctls_sym.sh, and maint/print_ioctlent.c.

7 years agolinux/ia64/syscallent.h: remove tabulation, add spaces in file comment
Eugene Syromyatnikov [Mon, 1 May 2017 16:40:01 +0000 (18:40 +0200)]
linux/ia64/syscallent.h: remove tabulation, add spaces in file comment

7 years agolinux/mtd-abi.h: remove non-ASCII character from file comment
Eugene Syromyatnikov [Mon, 1 May 2017 16:39:25 +0000 (18:39 +0200)]
linux/mtd-abi.h: remove non-ASCII character from file comment

7 years agoalpha, cris, mips, ppc, sh, sparc: fix decoding of sigsuspend syscall
Dmitry V. Levin [Sun, 30 Apr 2017 20:33:04 +0000 (20:33 +0000)]
alpha, cris, mips, ppc, sh, sparc: fix decoding of sigsuspend syscall

On some architectures old sigsuspend syscall takes the signal mask from
the 3rd argument, on some from the 1st.  And, if it wasn't peculiar
enough, the signal mask is passed by value on all architectures except
mips where it's passed by reference.

* signal.c (SYS_FUNC(sigsuspend)): Take the signal mask from the last
argument.
* linux/alpha/syscallent.h (sigsuspend): Set nargs to 1.
* linux/crisv10/syscallent.h: Likewise.
* linux/mips/syscallent-o32.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/powerpc64/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* tests/sigsuspend.c: New file.
* tests/gen_tests.in (sigsuspend): New entry.
* tests/pure_executables.list: Add sigsuspend.
* tests/.gitignore: Likewise.
* NEWS: Mention this fix.

7 years agotests: raise default timeout for individual tests
Dmitry V. Levin [Wed, 26 Apr 2017 23:41:15 +0000 (23:41 +0000)]
tests: raise default timeout for individual tests

Recently added tests based on pure_executables.list are quite slow
by their nature, the one minute default timeout is no longer enough
for some of not so fast architectures.

* tests/init.sh (TIMEOUT_DURATION): Raise from 60 to 120.

7 years agoUpdate NEWS
Eugene Syromyatnikov [Mon, 1 May 2017 12:48:25 +0000 (14:48 +0200)]
Update NEWS

7 years agoUpdate TCP_* constants
Dmitry V. Levin [Sat, 29 Apr 2017 00:37:07 +0000 (00:37 +0000)]
Update TCP_* constants

* xlat/socktcpoptions.in: Add TCP_FASTOPEN_CONNECT introduced
by linux kernel commit v4.11-rc1~124^2~321^2.

7 years agoUpdate AF_* constants
Dmitry V. Levin [Fri, 28 Apr 2017 23:34:56 +0000 (23:34 +0000)]
Update AF_* constants

* xlat/addrfams.in: Add AF_SMC introduced by linux kernel
commit v4.11-rc1~94^2~43^2~13.

7 years agotests: enhance madvise decoder check
Dmitry V. Levin [Thu, 27 Apr 2017 23:16:33 +0000 (23:16 +0000)]
tests: enhance madvise decoder check

* tests/mmap.c (main): Remove madvise check.
* tests/madvise.c: New file.
* tests/gen_tests.in (madvise): New entry.
* tests/.gitignore: Add madvise.
* tests/pure_executables.list: Likewise.

7 years agotests: add -etrace=?... test
Eugene Syromyatnikov [Tue, 25 Apr 2017 02:23:12 +0000 (04:23 +0200)]
tests: add -etrace=?... test

Check for some architecture-specific syscalls which are not present
on most architectures.

* gen_tests.in: Add trace_question test.
* tests/trace_question.in: New file.
* tests/Makefile.am (EXTRA_DIST): Add it.

7 years agotests: add more information to generated header comments
Eugene Syromyatnikov [Tue, 25 Apr 2017 02:21:56 +0000 (04:21 +0200)]
tests: add more information to generated header comments

* tests/gen_tests.sh: Update header comment with the source string
used for test generation.

7 years agotests: move generated common header comment into a variable
Eugene Syromyatnikov [Tue, 25 Apr 2017 02:20:50 +0000 (04:20 +0200)]
tests: move generated common header comment into a variable

* tests/gen_tests.sh: Move generated file header comment
into a variable, use it in all cases.

7 years agotests: use TAIL_ALLOC_OBJECT_CONST_PTR in v4l2 test
Dmitry V. Levin [Tue, 25 Apr 2017 14:35:47 +0000 (14:35 +0000)]
tests: use TAIL_ALLOC_OBJECT_CONST_PTR in v4l2 test

* tests/ioctl_v4l2.c (main): Use TAIL_ALLOC_OBJECT_CONST_PTR.

7 years agotests: Check decoding of VIDIOC_G/S_TUNER's arg
Edgar Kaziahmedov [Sun, 23 Apr 2017 01:53:48 +0000 (04:53 +0300)]
tests: Check decoding of VIDIOC_G/S_TUNER's arg

* tests/ioctl_v4l2.c (main): Add checks for VIDIOC_G/S_TUNER's arg.

Signed-off-by: Edgar Kaziahmedov <edos@linux.com>
7 years agov4l2: Add decoding for VIDIOC_G/S_TUNER's arg
Edgar Kaziahmedov [Sun, 23 Apr 2017 01:53:47 +0000 (04:53 +0300)]
v4l2: Add decoding for VIDIOC_G/S_TUNER's arg

* v4l2.c: Include "xlat/v4l2_tuner_types.h", "xlat/v4l2_tuner_capabilities.h",
"xlat/v4l2_tuner_rxsubchanses.h", and "xlat/v4l2_tuner_audmodes.h".
(print_v4l2_tuner): New function. Add decoding for VIDIOC_G/S_TUNER's arg.
(v4l2_ioctl): Add new cases for decoding VIDIOC_G/S_TUNER's arg.
* xlat/v4l2_tuner_types.in: Add V4L2_TUNER_RADIO and
V4L2_TUNER_ANALOG_TV introduced by linux kernel commit
2.5.46~39^2~23^2~4.
Add V4L2_TUNER_DIGITAL_TV introduced by linux kernel
commit v2.6.11-rc4~55^2~20.
Add V4L2_TUNER_ADC and V4L2_TUNER_RF introduced by linux kernel commit
v3.15-rc1~85^2~215.
Add V4L2_TUNER_SDR introduced by linux kernel commit v4.4-rc1~118^2~17
(as the replacement of V4L2_TUNER_ADC).
* xlat/v4l2_tuner_capabilities.in: Add V4L2_TUNER_CAP_LOW,
V4L2_TUNER_CAP_NORM, V4L2_TUNER_CAP_STEREO, V4L2_TUNER_CAP_LANG2,
V4L2_TUNER_CAP_SAP, and V4L2_TUNER_CAP_LANG1 introduced by linux kernel
commit 2.5.46~39^2~23^2~4.
Add V4L2_TUNER_CAP_HWSEEK_BOUNDED and V4L2_TUNER_CAP_HWSEEK_WRAP
introduced by linux kernel commit v3.6-rc1~28^2~306.
Add V4L2_TUNER_CAP_RDS introduced by linux commit v2.6.32-rc1~679^2~189.
Add V4L2_TUNER_CAP_RDS_BLOCK_IO and V4L2_TUNER_CAP_RDS_CONTROLS
introduced by linux kernel commit v2.6.37-rc1~64^2~110.
Add V4L2_TUNER_CAP_FREQ_BANDS introduced by linux kernel commit
v3.6-rc1~28^2~46.
Add V4L2_TUNER_CAP_HWSEEK_PROG_LIM introduced by linux kernel commit
v3.6-rc1~28^2~40.
Add V4L2_TUNER_CAP_1HZ introduced by linux kernel commit
v3.15-rc1~85^2~214.
* xlat/v4l2_tuner_audmodes.in: Add V4L2_TUNER_MODE_MONO,
V4L2_TUNER_MODE_STEREO, V4L2_TUNER_MODE_LANG2, V4L2_TUNER_MODE_SAP, and
V4L2_TUNER_MODE_LANG1 introduced by linux kernel commit
2.5.46~39^2~23^2~4.
Add V4L2_TUNER_MODE_LANG1_LANG2 introduced by linux kernel commit
v2.6.17-rc1~739^2~9.
* xlat/v4l2_tuner_rxsubchanses.in: Add V4L2_TUNER_SUB_MONO,
V4L2_TUNER_SUB_STEREO, V4L2_TUNER_SUB_LANG2, V4L2_TUNER_SUB_SAP, and
V4L2_TUNER_SUB_LANG1 introduced by linux kernel commit
2.5.46~39^2~23^2~4.
Add V4L2_TUNER_SUB_RDS introduced by linux kernel commit
v2.6.32-rc1~679^2~189.

Signed-off-by: Edgar Kaziahmedov <edos@linux.com>
7 years agotests: check decoding of invalid tv_sec and tv_usec values
Dmitry V. Levin [Mon, 24 Apr 2017 00:08:51 +0000 (00:08 +0000)]
tests: check decoding of invalid tv_sec and tv_usec values

* tests/futimesat.c (main): Check decoding of invalid tv_sec and tv_usec
values.
* tests/xetitimer.c (main): Likewise.
* tests/xettimeofday.c (main): Likewise.
* tests/xselect.c (main): Likewise.
* tests/xutimes.c (main): Likewise.

7 years agotests: check decoding of invalid tv_sec and tv_nsec values
Dmitry V. Levin [Sun, 23 Apr 2017 23:10:57 +0000 (23:10 +0000)]
tests: check decoding of invalid tv_sec and tv_nsec values

* tests/aio.c (main): Check decoding of invalid tv_sec and tv_nsec
values.
* tests/clock_nanosleep.c (main): Likewise.
* tests/clock_xettime.c (main): Likewise.
* tests/futex.c (main): Likewise.
* tests/nanosleep.c (main): Likewise.
* tests/ppoll.c (main): Likewise.
* tests/pselect6.c (main): Likewise.
* tests/recvmmsg-timeout.c (main): Likewise.
* tests/rt_sigtimedwait.c (main): Likewise.
* tests/semop.c (main): Likewise.
* tests/timer_xettime.c (main): Likewise.
* tests/timerfd_xettime.c (main): Likewise.
* tests/utimensat.c (main): Likewise.

7 years agoPrint time in ISO 8601 format in time syscall decoder
Eugene Syromyatnikov [Sun, 23 Apr 2017 19:51:27 +0000 (21:51 +0200)]
Print time in ISO 8601 format in time syscall decoder

* print_time.c (SYS_FUNC(time)): Print timestamp stringification
(via sprinttime) for the value stored in the argument and return value
(return RVAL_STR in the latter case).
* tests/time.c (main): Update expected output.

7 years agoPrint string representation of timestamps in parsers of *utime* syscalls
Eugene Syromyatnikov [Sun, 23 Apr 2017 04:07:55 +0000 (06:07 +0200)]
Print string representation of timestamps in parsers of *utime* syscalls

* print_timespec.c (print_timespec_t_utime): Use sprinttime_nsec
to format a string representation of time, use tprints_comment
to print it as a comment.
* print_timeval.c (print_timeval_t_utime): New function.
(print_timeval_utimes): Use it instead of print_timeval_t.
[ALPHA] (print_timeval32_t_utime): New function.
[ALPHA] (print_timeval32_utimes): Use it instead of print_timeval32_t.
* tests/futimesat.c (print_tv): Update expected output.
* tests/utimensat.c (print_ts): Likewise.
* tests/xutimes.c (print_tv): Likewise.

Co-authored-by: Dmitry V. Levin <ldv@altlinux.org>
7 years agotests: add support for printing timestamp with microsecond precision
Eugene Syromyatnikov [Sun, 23 Apr 2017 04:04:44 +0000 (06:04 +0200)]
tests: add support for printing timestamp with microsecond precision

It will be needed later.

* tests/tests.h (print_time_t_usec): New prototype.
* tests/print_time.c (print_time_t_usec): New function, a thin wrapper
around print_time_t_ex.

7 years agoPrint microseconds/nanoseconds as non-negative
Eugene Syromyatnikov [Sun, 23 Apr 2017 03:57:03 +0000 (05:57 +0200)]
Print microseconds/nanoseconds as non-negative

Negative micro/nanoseconds values are treated as invalid by kernel
anyway, and in one case (timespec_valid in include/linux/time.h)
it is even checked by conversion to unsigned long.

* print_timespec.c (timespec_fmt): Change tv_sec format to %lld and
tv_nsec format to %llu.
(print_timespec_t): Cast tv_sec to long long and process tv_nsec with
zero_extend_signed_to_ull.
(sprint_timespec): Likewise.
* print_timeval.c (timeval_fmt): Change tv_sec format to %lld and
tv_usec format to %llu.
(print_timeval_t): Cast tv_sec to long long and process tv_nsec with
zero_extend_signed_to_ull.
(sprint_timeval, print_timeval32_t, sprint_timeval32): Likewise.
* defs.h (TIMESPEC_TEXT_BUFSIZE): Update.
* tests/adjtimex.c (main): Change tv_sec printing format to %lld, cast
it to long long; change tv_usec printing format to %llu, process it with
zero_extend_signed_to_ull.
* tests/clock_nanosleep.c (main): Change tv_sec printing format to %lld,
cast it to long long; change tv_nsec printing format to %llu, process it
with zero_extend_signed_to_ull.
* tests/clock_xettime.c (main): Likewise.
* tests/futex.c (main): Likewise.
* tests/futimesat.c (print_tv): Likewise.
* tests/getrusage.c (invoke_print): Likewise.
* tests/mq_sendrecv.c (do_send, do_recv, main): Likewise.
* tests/nanosleep.c (main): Likewise.
* tests/pselect6.c (main): Likewise.
* tests/restart_syscall.c (main): Likewise.
* tests/rt_sigtimedwait.c (iterate, main): Likewise.
* tests/sched_rr_get_interval.c (main): Likewise.
* tests/semop.c (main): Likewise.
* tests/timer_xettime.c (main): Likewise.
* tests/timerfd_xettime.c (main): Likewise.
* tests/waitid.c (main): Likewise.
* tests/xetitimer.c (main): Likewise.
* tests/xettimeofday.c (main): Likewise.
* tests/xselect.c (main): Likewise.
* tests/xutimes.c (print_tv): Likewise.
* tests/wait4.c (sprint_rusage): Likewise.
* tests/waitid.c (sprint_rusage): Likewise.
* tests/utimensat.c (print_ts): Likewise.
(main): Add check for higher bits of tv_sec/tv_nsec.

Co-authored-by: Dmitry V. Levin <ldv@altlinux.org>
7 years agoAlways print raw values of time data fields
Eugene Syromyatnikov [Fri, 21 Apr 2017 03:16:12 +0000 (05:16 +0200)]
Always print raw values of time data fields

Refactor sprinttime: implement sprinttime_nsec and sprinttime_usec
that handle nanoseconds and microseconds, respectively.
Always print raw values of time data fields, format string
representations of time as comments.

* defs.h (sprinttime): Change argument type from time_t to long long.
(sprinttime_nsec, sprinttime_usec): New prototypes.
* util.c (sprinttime_ex, sprinttime_nsec, sprinttime_usec): New
functions.
(sprinttime): Turn into a thin wrapper around sprinttime_ex.
* stat.h (struct strace_stat): Add has_nsec field.
* fetch_struct_stat.c (HAVE_NSEC): New macro.
(fetch_struct_stat): Initialize has_nsec field with HAVE_NSEC.
* fetch_struct_stat64.c (HAVE_NSEC): New macro.
(fetch_struct_stat64): Initialize has_nsec field with HAVE_NSEC.
* print_struct_stat.c (print_struct_stat) <PRINT_ST_TIME>:
Print raw values of time fields, use sprinttime_nsec to format a string
representation of time, use tprints_comment to print it as a comment.
* statx.c (SYS_FUNC(statx)) <PRINT_FIELD_TIME>: Likewise.
* utime.c (SYS_FUNC(utime)): Print raw values of struct utimbuf.actime
and struct utimbuf.modtime fields, use sprinttime to format a string
representation of time, use tprints_comment to print it as a comment.
* tests/tests.h (print_time_t_nsec): Add int argument.
* tests/print_time.c (print_time_t_ex): New function.
(print_time_t_nsec): Add int argument, turn into a thin wrapper around
print_time_t_ex.
* tests/utime.c (main): Update expected output.
* tests/xstatx.c [!IS_STATX] (HAVE_NSEC): New macro.
[!IS_STATX] (PRINT_ST_TIME), [IS_STATX] (PRINT_FIELD_TIME): Update
expected output.
* NEWS: Mention this timestamps representation improvement.

Co-authored-by: Dmitry V. Levin <ldv@altlinux.org>
7 years agoIntroduce tprintf_comment and tprints_comment functions
Dmitry V. Levin [Mon, 24 Apr 2017 19:31:54 +0000 (19:31 +0000)]
Introduce tprintf_comment and tprints_comment functions

* defs.h (tprintf_comment, tprints_comment): New prototypes.
* strace.c (tvprintf): New function.
(tprintf): Use it.
(tprintf_comment, tprints_comment): New functions.
* aio.c (tprint_lio_opcode): Use tprints_comment.
* dm.c (dm_decode_dm_target_spec, dm_decode_dm_target_deps,
dm_decode_dm_name_list, dm_decode_dm_target_versions,
dm_decode_dm_target_msg, dm_decode_string, dm_known_ioctl): Likewise.
* futex.c (SYS_FUNC(futex)): Likewise.
* perf.c (print_perf_event_attr): Likewise.
* seccomp.c (decode_bpf_code): Likewise.
* util.c (printxvals, printxval_searchn, printflags64): Likewise.
* btrfs.c (print_u64, btrfs_print_key_type, btrfs_print_objectid,
print_key_value_internal): Likewise.
(btrfs_ioctl): Use tprints_comment and tprintf_comment.
* dirent.c (SYS_FUNC(getdents)): Likewise.
* dirent64.c (SYS_FUNC(getdents64)): Likewise.
* execve.c (printargc): Use tprintf_comment.
* tests/btrfs.c (btrfs_test_get_dev_stats_ioctl,
btrfs_test_features_ioctls): Update expected output.

7 years agoMake output of execve/execveat syscall parsers more structured
Dmitry V. Levin [Mon, 24 Apr 2017 19:22:11 +0000 (19:22 +0000)]
Make output of execve/execveat syscall parsers more structured

* execve.c (printargc): Always print the address, format the number
of variables as a comment.
* tests/execve.c: Update expected output.
* tests/execveat.c: Likewise.
* tests/qual_syscall.test: Likewise.
* tests/strace-r.expected: Likewise.
* tests/strace-t.test: Likewise.
* tests/strace-tt.test: Likewise.
* tests/strace-ttt.test: Likewise.
* tests/threads-execve.c: Likewise.
* tests/threads-execve.test: Likewise.

7 years agodm: fix diagnostics about misplaced parts of struct dm_ioctl
Dmitry V. Levin [Mon, 24 Apr 2017 19:14:41 +0000 (19:14 +0000)]
dm: fix diagnostics about misplaced parts of struct dm_ioctl

* dm.c (dm_decode_dm_target_spec, dm_decode_dm_target_deps,
dm_decode_dm_name_list, dm_decode_dm_target_versions,
dm_decode_dm_target_msg, dm_decode_string, dm_known_ioctl): Fix
diagnostics about various misplaced parts of struct dm_ioctl.
* tests/ioctl_dm.c: Update expected output.

7 years agoprint_mq_attr: fix typo
Dmitry V. Levin [Mon, 24 Apr 2017 14:14:07 +0000 (14:14 +0000)]
print_mq_attr: fix typo

* print_mq_attr.c (printmqattr): Fix the last argument of printflags64.

7 years agotests: add faulty pointer check to time test
Eugene Syromyatnikov [Sun, 23 Apr 2017 19:50:29 +0000 (21:50 +0200)]
tests: add faulty pointer check to time test

* tests/time.c (main): Add check for an inaccessible pointer.

7 years agotests: fix print_time_t_nsec usage in xstatx.c
Dmitry V. Levin [Sat, 22 Apr 2017 00:15:41 +0000 (00:15 +0000)]
tests: fix print_time_t_nsec usage in xstatx.c

* tests/xstatx.c (print_stat): Pass tv_nsec field through
zero_extend_signed_to_ull before feeding it to print_time_t_nsec.

7 years agotests: fix netlink_protocol on sparc
Dmitry V. Levin [Fri, 21 Apr 2017 23:01:22 +0000 (23:01 +0000)]
tests: fix netlink_protocol on sparc

* tests/netlink_protocol.c (test_nlmsgerr): Do not access fields of an
unaligned structure, this makes architectures like sparc very unhappy.

7 years agoutil: return pointer to string literal directly in sprinttime
Eugene Syromyatnikov [Wed, 1 Mar 2017 01:25:20 +0000 (02:25 +0100)]
util: return pointer to string literal directly in sprinttime

There is no sense to copy it to static buffer first.

* util.c (sprinttime): Just return "0", do not copy it to internal
buffer first.

7 years agotests: remove stat.sample creation from gen_tests.in
Dmitry V. Levin [Fri, 21 Apr 2017 03:54:02 +0000 (03:54 +0000)]
tests: remove stat.sample creation from gen_tests.in

stat.sample is created by appropriate executables and never removed.

* tests/gen_tests.in (trace_fstat, trace_lstat, trace_stat,
trace_stat_like): Remove stat.sample creation.

7 years agotests: tabulate fstat.test
Dmitry V. Levin [Fri, 21 Apr 2017 03:49:07 +0000 (03:49 +0000)]
tests: tabulate fstat.test

* tests/gen_tests.in (fstat): New entry.
(fstat64, oldfstat): Update.
* tests/fstat.test: Remove.
* tests/Makefile.am (DECODER_TESTS): Remove fstat.test.

7 years agoImplement -e trace=%stat option
Eugene Syromyatnikov [Tue, 18 Apr 2017 01:14:52 +0000 (03:14 +0200)]
Implement -e trace=%stat option

linux/*/syscallent*.h part is updated automatically by:

    sed -i '/statx/! s/TF|TSTA,/TF|TST|TSTA,/' linux/*/syscallent*.h

* sysent.h (TRACE_STAT): New macro.
* syscall.c: Alias LST to TRACE_STAT around syscallent.h inclusion.
* qualify.c (lookup_class): Add TRACE_STAT for "%stat".
* strace.1 (.SS Filtering): Add information about %stat syscall class.
* NEWS: Mention this change.
* linux/aarch64/syscallent.h (stat): Add TST flag.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent-n32.h: Likewise.
* linux/mips/syscallent-n64.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/arm/syscallent.h (oldstat, stat, stat64): Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/crisv10/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/syscallent-o32.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/avr32/syscallent.h (stat, stat64): Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/xtensa/syscallent.h: Likewise.
* linux/powerpc64/syscallent.h (oldstat, stat): Likewise.
* linux/alpha/syscallent.h (osf_old_stat, osf_stat, stat, stat64): Likewise.
* linux/mips/syscallent-compat.h (bsd43_oldstat, bsd43_stat, posix_stat,
svr4_stat, svr4_xstat, sysv_stat, sysv_xstat): Likewise.
* tests/gen_tests.in (trace_stat): New entry.
* tests/trace_stat.in: New file.
* tests/Makefile.am (EXTRA_DIST): Add it.
* tests/ksysent.c (TST): New macro, defined to 0.
* tests/nsyscalls.c: Likewise.

7 years agoImplement -e trace=%lstat option
Eugene Syromyatnikov [Tue, 18 Apr 2017 00:23:05 +0000 (02:23 +0200)]
Implement -e trace=%lstat option

linux/*/syscallent*.h part is updated automatically by:

    sed -i '/TSTA,.*lx\?stat/ s/TSTA,/TLST|&/' linux/*/syscallent*.h

* sysent.h (TRACE_LSTAT): New macro.
* syscall.c: Alias TLST to TRACE_LSTAT around syscallent.h inclusion.
* qualify.c (lookup_class): Add TRACE_LSTAT for "%lstat".
* strace.1 (.SS Filtering): Add information about %lstat syscall class.
* NEWS: Mention this change.
* linux/aarch64/syscallent.h (lstat): Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent-n32.h: Likewise.
* linux/mips/syscallent-n64.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/arm/syscallent.h (lstat, lstat64, oldlstat): Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/crisv10/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/syscallent-o32.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/avr32/syscallent.h (lstat, lstat64): Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/powerpc64/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/xtensa/syscallent.h: Likewise.
* linux/alpha/syscallent.h (lstat, lstat64, osf_lstat, osf_old_lstat): Likewise.
* linux/mips/syscallent-compat.h (bsd43_lstat, posix_lstat, svr4_lstat,
sysv_lstat): Likewise.
* tests/gen_tests.in (trace_lstat): New entry.
* tests/trace_lstat.in: New file.
* tests/Makefile.am (EXTRA_DIST): Add it.
* tests/ksysent.c (TLST): New macro, defined to 0.
* tests/nsyscalls.c: Likewise.

7 years agoImplement -e trace=%fstat option
Eugene Syromyatnikov [Mon, 17 Apr 2017 23:52:58 +0000 (01:52 +0200)]
Implement -e trace=%fstat option

linux/*/syscallent*.h part is updated automatically by:

    sed -i -e '/TSTA.*fx\?stat/ s/TSTA,/TFST|&/' \
           -e 's/\(TD|TF|TFST|TSTA,\)[[:space:]]/\1/' linux/*/syscallent*.h

* sysent.h (TRACE_FSTAT): New macro.
* syscall.c: Alias TFST to TRACE_FSTAT around syscallent.h inclusion.
* qualify.c (lookup_class): Add TRACE_FSTAT for "%fstat".
* strace.1 (.SS Filtering): Add information about %fstat syscall class.
* NEWS: Mention this change.
* linux/32/syscallent.h (fstat64, fstatat64): Add TFST flag.
* linux/64/syscallent.h (fstat, newfstatat): Likewise.
* linux/aarch64/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent-n32.h: Likewise.
* linux/mips/syscallent-n64.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/arm/syscallent.h (fstat, fstat64, fstatat64, oldfstat): Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/crisv10/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/syscallent-o32.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/avr32/syscallent.h (fstat, fstat64, fstatat64): Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/xtensa/syscallent.h: Likewise.
* linux/alpha/syscallent.h (fstat, fstat64, fstatat64, osf_fstat,
osf_old_fstat): Likewise.
* linux/powerpc64/syscallent.h (fstat, newfstatat, oldfstat): Likewise.
* linux/mips/syscallent-compat.h (bsd43_fstat, bsd43_oldfstat, posix_fstat,
svr4_fstat, sysv_fstat): Likewise.
* tests/gen_tests.in (trace_fstat): New entry.
* tests/trace_fstat.in: New file.
* tests/Makefile.am (EXTRA_DIST): Add it.
* tests/ksysent.c (TFST): New macro, defined to 0.
* tests/nsyscalls.c: Likewise.

7 years agoImplement -e trace=%%stat option
Eugene Syromyatnikov [Mon, 17 Apr 2017 23:14:58 +0000 (01:14 +0200)]
Implement -e trace=%%stat option

linux/*/syscallent*.h part is updated automatically by:

    sed -i '/TSFA\|stat[iu]s/! s/,[[:space:]]\?\([[:space:]]*SEN(.*stat\)/|TSTA,\1/' \
        linux/*/syscallent*.h

* sysent.h (TRACE_STAT_LIKE): New macro.
* syscall.c: Alias TSTA to TRACE_STAT_LIKE around syscallent.h inclusion.
* qualify.c (lookup_class): Add TRACE_STAT_LIKE for "%%stat".
* strace.1 (.SS Filtering): Add information about %%stat syscall class.
* NEWS: Mention this change.
* linux/32/syscallent.h (fstat64, fstatat64, statx): Add TSTA flag.
* linux/64/syscallent.h (fstat, newfstatat, statx): Likewise.
* linux/aarch64/syscallent.h (fstat, lstat, newfstatat, stat): Likewise.
* linux/alpha/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64,
osf_fstat, osf_lstat, osf_old_fstat, osf_old_lstat, osf_old_stat, osf_stat,
stat, stat64): Likewise.
* linux/arm/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, oldfstat,
oldlstat, oldstat, stat, stat64, statx): Likewise.
* linux/avr32/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, stat,
stat64): Likewise.
* linux/bfin/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64,
oldfstat, oldlstat, oldstat, stat, stat64): Likewise.
* linux/crisv10/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64,
oldfstat, oldlstat, oldstat, stat, stat64): Likewise.
* linux/hppa/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, stat,
stat64): Likewise.
* linux/i386/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, oldfstat,
oldlstat, oldstat, stat, stat64, statx): Likewise.
* linux/ia64/syscallent.h (fstat, lstat, newfstatat, stat): Likewise.
* linux/m68k/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, oldfstat,
oldlstat, oldstat, stat, stat64, statx): Likewise.
* linux/microblaze/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64,
oldfstat, oldlstat, oldstat, stat, stat64): Likewise.
* linux/mips/syscallent-compat.h (bsd43_fstat, bsd43_lstat, bsd43_oldfstat,
bsd43_oldstat, bsd43_stat, posix_fstat, posix_lstat, posix_stat, svr4_fstat,
svr4_fxstat, svr4_lstat, svr4_lxstat, svr4_stat, svr4_xstat, sysv_fstat,
sysv_fxstat, sysv_lstat, sysv_lxstat, sysv_stat, sysv_xstat): Likewise.
* linux/mips/syscallent-n32.h (fstat, lstat, newfstatat, stat, statx): Likewise.
* linux/mips/syscallent-n64.h (fstat, lstat, newfstatat, stat, statx): Likewise.
* linux/mips/syscallent-o32.h (fstat, fstat64, fstatat64, lstat, lstat64,
oldfstat, oldlstat, oldstat, stat, stat64, statx): Likewise.
* linux/powerpc64/syscallent.h (fstat, lstat, newfstatat, oldfstat, oldlstat,
oldstat, stat): Likewise.
* linux/powerpc/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64,
oldfstat, oldlstat, oldstat, stat, stat64, statx): Likewise.
* linux/s390/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, stat,
stat64, statx): Likewise.
* linux/s390x/syscallent.h (fstat, lstat, newfstatat, stat, statx): Likewise.
* linux/sh64/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, oldfstat,
oldlstat, oldstat, stat, stat64): Likewise.
* linux/sh/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, oldfstat,
oldlstat, oldstat, stat, stat64): Likewise.
* linux/sparc64/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64,
oldlstat, stat, stat64): Likewise.
* linux/sparc/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64,
oldlstat, stat, stat64): Likewise.
* linux/x32/syscallent.h (fstat, lstat, newfstatat, stat, statx): Likewise.
* linux/x86_64/syscallent.h (fstat, lstat, newfstatat, stat, statx): Likewise.
* linux/xtensa/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, stat,
stat64, statx): Likewise.
* tests/gen_tests.in (trace_stat_like): New entry.
* tests/trace_stat_like.in: New file.
* tests/Makefile.am (EXTRA_DIST): Add it.
* tests/ksysent.c (TSTA): New macro, defined to 0.
* tests/nsyscalls.c: Likewise.

7 years agoqualify: add syntax for optional non-matching syscall qualification
Eugene Syromyatnikov [Mon, 17 Apr 2017 23:02:09 +0000 (01:02 +0200)]
qualify: add syntax for optional non-matching syscall qualification

It may be useful in case syscall is not present on the target
architecture.

* qualify.c (qualify_syscall): Add ignore_fail flag, set it to true
in case syscall qualification is led by a question mark(s).
* strace.1 (.SS Filtering): Document ability to use question marks
in syscall qualification.

7 years agolinux/alpha/syscallent.h: add TSFA flag to osf_getfsstat
Eugene Syromyatnikov [Mon, 17 Apr 2017 19:01:05 +0000 (21:01 +0200)]
linux/alpha/syscallent.h: add TSFA flag to osf_getfsstat

In accordance with [1].

[1] https://www.freebsd.org/cgi/man.cgi?query=getfsstat&sektion=2

* linux/alpha/syscallent.h (osf_getfsstat): Add TSFA flag.
* strace.1 (.SS Filtering) <%%statfs>: Update equivalent regexp.

7 years agolinux/mips/syscallent-compat.h: add some TD/TF flags for *stat* variants
Eugene Syromyatnikov [Mon, 17 Apr 2017 18:55:51 +0000 (20:55 +0200)]
linux/mips/syscallent-compat.h: add some TD/TF flags for *stat* variants

*xstat syscalls are, according to [1], like their *stat counterparts,
but with additional argument with fixed value.

[1] http://math-atlas.sourceforge.net/devel/assembly/mipsabi32.pdf

* linux/mips/syscallent-compat.h (*_xstat, *_lxstat, bsd43_oldstat):
Add TF flag.
(*_fxstat, bsd43_oldfstat): Add TD flag.

7 years agoImplement -e trace=%%statfs option
Eugene Syromyatnikov [Sun, 16 Apr 2017 13:30:29 +0000 (15:30 +0200)]
Implement -e trace=%%statfs option

linux/*/syscallent*.h part is updated automatically by:

    sed -i 's/\(TSF\),[[:space:]]\?/\1|TSFA,/' linux/*/syscallent*.h
    sed -i 's/\(TFSF\),/\1|TSFA,/' linux/*/syscallent*.h
    sed -i 's/0\(,.*ustat\)/TSFA\1/' linux/*/syscallent*.h

* sysent.h (TRACE_STATFS_LIKE): New macro.
* syscall.c: Alias TSFA to TRACE_STATFS_LIKE around syscallent.h inclusion.
* qualify.c (lookup_class): Add SCHED_STATFS_LIKE for "%%statfs".
* strace.1 (.SS Filtering): Add information about %%statfs syscall class.
* NEWS: Mention this change.
* linux/32/syscallent.h (statfs64, fstatfs64): Add TSFA flag.
* linux/64/syscallent.h (statfs, fstatfs): Likewise.
* linux/aarch64/syscallent.h (statfs, fstatfs, ustat): Likewise.
* linux/mips/syscallent-n64.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/arm/syscallent.h (statfs, statfs64, fstatfs, fstatfs64, ustat):
Likewise.
* linux/avr32/syscallent.h: Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/crisv10/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/syscallent-n32.h: Likewise.
* linux/mips/syscallent-o32.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/powerpc64/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/xtensa/syscallent.h: Likewise.
* linux/alpha/syscallent.h (osf_statfs, osf_statfs64, statfs,
ofs_fstatfs, osf_fstatfs64, ustat): Likewise.
* linux/mips/syscallent-compat.h (*_statfs, *_statvfs, *_fstatfs): Likewise.
* tests/gen_tests.in (trace_statfs_like): New entry.
* tests/trace_statfs_like.in: New file.
* tests/Makefile.am (EXTRA_DIST): Add it.
* tests/ksysent.c (TSFA): New macro, defined to 0.
* tests/nsyscalls.c: Likewise.

7 years agoImplement -e trace=%fstatfs option
Eugene Syromyatnikov [Mon, 17 Apr 2017 18:29:44 +0000 (20:29 +0200)]
Implement -e trace=%fstatfs option

linux/*/syscallent*.h part is updated automatically by:

    sed -i 's/TD,[[:space:]]\([[:space:]]*SEN.*[_"]fstatv\?fs\)/TD|TFSF,\1/' \
           linux/*/syscallent*.h

* sysent.h (TRACE_FSTATFS): New macro.
* syscall.c: Alias TFSF to TRACE_FSTATFS around syscallent.h inclusion.
* qualify.c (lookup_class): Add SCHED_FSTATFS for "%fstatfs".
* strace.1 (.SS Filtering): Add information about %fstatfs syscall class.
* NEWS: Mention this change.
* linux/32/syscallent.h (fstatfs64): Add TFSF flag.
* linux/64/syscallent.h (fstatfs): Likewise.
* linux/aarch64/syscallent.h: Likewise.
* linux/mips/syscallent-n64.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/arm/syscallent.h (fstatfs, fstatfs64):
Likewise.
* linux/avr32/syscallent.h: Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/crisv10/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/syscallent-n32.h: Likewise.
* linux/mips/syscallent-o32.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/powerpc64/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/xtensa/syscallent.h: Likewise.
* linux/alpha/syscallent.h (ofs_fstatfs, osf_fstatfs64): Likewise.
* linux/mips/syscallent-compat.h (*_fstatfs, *_fstatvfs): Likewise.
* tests/gen_tests.in (trace_fstatfs): New entry.
* tests/trace_fstatfs.in: New file.
* tests/Makefile.am (EXTRA_DIST): Add it.
* tests/ksysent.c (TFSF): New macro, defined to 0.
* tests/nsyscalls.c: Likewise.

7 years agosysent.h: format syscall flag macros
Eugene Syromyatnikov [Sun, 16 Apr 2017 13:24:00 +0000 (15:24 +0200)]
sysent.h: format syscall flag macros

Add some tabulation and leading zeroes to the values.

7 years agotests: tabulate sched.test
Dmitry V. Levin [Fri, 21 Apr 2017 01:29:29 +0000 (01:29 +0000)]
tests: tabulate sched.test

Rewrite sched.test using test_trace_expr().

* tests/gen_tests.in (sched): New entry.
* tests/sched.in: New file, derived from a set of tests in sched.test.
* tests/sched.test: Remove.
* tests/Makefile.am (DECODER_TESTS): Remove sched.test.
(EXTRA_DIST): Add sched.in.

7 years agotests: tabulate regex.test
Dmitry V. Levin [Fri, 21 Apr 2017 01:29:29 +0000 (01:29 +0000)]
tests: tabulate regex.test

Rewrite regex.test using test_trace_expr().

* tests/gen_tests.in (regex): New entry.
* tests/regex.in: New file, derived from a set of tests in regex.test.
* tests/regex.test: Remove.
* tests/Makefile.am (DECODER_TESTS): Remove regex.test.
(EXTRA_DIST): Add regex.in.

7 years agotests: tabulate clock.test
Dmitry V. Levin [Fri, 21 Apr 2017 01:29:29 +0000 (01:29 +0000)]
tests: tabulate clock.test

Rewrite clock.test using test_trace_expr().

* tests/gen_tests.in (clock): New entry.
* tests/clock.in: New file, derived from a set of tests in clock.test.
* tests/clock.test: Remove.
* tests/Makefile.am (DECODER_TESTS): Remove clock.test.
(EXTRA_DIST): Add clock.in.

7 years agotests: tabulate trace_statfs.test
Eugene Syromyatnikov [Thu, 20 Apr 2017 00:43:49 +0000 (02:43 +0200)]
tests: tabulate trace_statfs.test

Rewrite trace_statfs.test using test_trace_expr().

* tests/gen_tests.in (trace_statfs): New entry.
* tests/trace_statfs.in: New file, derived from a set of tests
in trace_statfs.test.
* tests/trace_statfs.test: Remove.
* tests/Makefile.am (DECODER_TESTS): Remove trace_statfs.test.
(EXTRA_DIST): Add trace_statfs.in.

7 years agotests/init.sh: add helpers for running set of programs
Eugene Syromyatnikov [Thu, 20 Apr 2017 00:39:54 +0000 (02:39 +0200)]
tests/init.sh: add helpers for running set of programs

This introduces three new helpers:
prog_set_subtract subtracts one program set from another,
test_pure_prog_set runs strace check on a set of programs,
test_trace_expr tests trace expressions.

* tests/init.sh (prog_set_subtract, test_pure_prog_set,
test_trace_expr): New functions.

7 years agotests: extend gen_tests.sh further
Dmitry V. Levin [Thu, 20 Apr 2017 18:11:35 +0000 (18:11 +0000)]
tests: extend gen_tests.sh further

* tests/gen_tests.sh: Extend support of arbitrary rules.

7 years agotests/xstat.c: do not remove sample file after test
Eugene Syromyatnikov [Thu, 20 Apr 2017 01:04:50 +0000 (03:04 +0200)]
tests/xstat.c: do not remove sample file after test

As tests are executed in separate directories now, there is no need to
remove sample file.

* tests/xstat.c (main): Remove unlink calls.

7 years agotests: use fixed name for stat tests sample file
Eugene Syromyatnikov [Wed, 19 Apr 2017 23:01:29 +0000 (01:01 +0200)]
tests: use fixed name for stat tests sample file

As tests are now run in separate directories.

* tests/xstatx.c: Use fixed "stat.sample" name for sample file.
* tests/fstat.test: Use it as an argument for -P option.
* tests/gen_tests.in (fstat64, lstat, lstat64, newfstatat, oldlstat,
oldstat, stat, stat64, statx): Likewise.

7 years agoDerive copyright year from the git commit date
Eugene Syromyatnikov [Tue, 4 Apr 2017 12:30:39 +0000 (14:30 +0200)]
Derive copyright year from the git commit date

This solves problems like the need to update test suite on every
New Year's Eve.

* Makefile.am (dist-hook): Generate .year.
* copyright-year-gen: New file.
* configure.ac (copyright_year): New m4 variable, defined as the output
of copyright-year-gen script.
(AC_COPYRIGHT): Use it.
(COPYRIGHT_YEAR): New output variable and preprocessor macro.
* strace.c (print_version): Use COPYRIGHT_YEAR.
* strace.spec.in (%prep): Save the value of COPYRIGHT_YEAR autoconf
variable to .year file.
* tests/strace-V.test (config_year): New variable, derived from config.h.
Add sanity checks for $config_year and use it in expected output.

Reported-by: Andreas Schwab <schwab@suse.de>
7 years agotests: move /proc/ checks from scripts to executables
Dmitry V. Levin [Wed, 19 Apr 2017 02:16:31 +0000 (02:16 +0000)]
tests: move /proc/ checks from scripts to executables

Move most of /proc/self/task/ and /proc/self/fd/ checks from scripts
to xecutables.

* tests/attach-f-p.test: Move /proc/self/task/ check ...
* tests/attach-f-p-cmd.c (main): ... here.
* tests/fstat.test: Move /proc/self/fd/ check ...
* tests/xstatx.c (main): ... here.
* tests/net-y-unix.test: Move /proc/self/fd/ check ...
* tests/net-y-unix.c (main): ... here.
* tests/net-yy-inet.test: Move /proc/self/fd/ check ...
* tests/net-yy-inet.c (main): ... here.
* tests/net-yy-netlink.test: Move /proc/self/fd/ check ...
* tests/net-yy-netlink.c (main): ... here.
* tests/net-yy-unix.test: Move /proc/self/fd/ check ...
* tests/net-yy-unix.c (main): ... here.

7 years agotests: tabulate pread64-pwrite64.test
Dmitry V. Levin [Wed, 19 Apr 2017 02:16:31 +0000 (02:16 +0000)]
tests: tabulate pread64-pwrite64.test

* tests/gen_tests.in (pread64-pwrite64): New entry.
* tests/pread64-pwrite64.c: (main): Skip the test if /proc/self/fd/
is not available.
* tests/pread64-pwrite64.test: Remove.
* tests/Makefile.am (DECODER_TESTS): Remove pread64-pwrite64.test.

7 years agotests: tabulate read-write.test
Dmitry V. Levin [Wed, 19 Apr 2017 02:16:31 +0000 (02:16 +0000)]
tests: tabulate read-write.test

* tests/gen_tests.in (read-write): New entry.
* tests/read-write.c: (main): Skip the test if /proc/self/fd/
is not available.
* tests/read-write.test: Remove.
* tests/Makefile.am (DECODER_TESTS): Remove read-write.test.

7 years agotests: add skip_if_unavailable function to libtests
Dmitry V. Levin [Wed, 19 Apr 2017 02:16:31 +0000 (02:16 +0000)]
tests: add skip_if_unavailable function to libtests

* tests/skip_unavailable.c: New file.
* tests/tests.h (skip_if_unavailable): New prototype.
* tests/Makefile.am (libtests_a_SOURCES): Add skip_unavailable.c.

7 years agotests: tabulate netlink_protocol.test
Dmitry V. Levin [Wed, 19 Apr 2017 00:55:21 +0000 (00:55 +0000)]
tests: tabulate netlink_protocol.test

* tests/gen_tests.in (netlink_protocol): New entry.
* tests/netlink_protocol.test: Remove.
* tests/Makefile.am (DECODER_TESTS): Remove netlink_protocol.test.

7 years agotests: tabulate statfs.test
Dmitry V. Levin [Wed, 19 Apr 2017 00:02:56 +0000 (00:02 +0000)]
tests: tabulate statfs.test

* tests/gen_tests.in (statfs): New entry.
(fstatfs, fstatfs64, statfs64): Update.
* tests/statfs.test: Remove.
* tests/Makefile.am (DECODER_TESTS): Remove statfs.test.

7 years agotests: skip statfs related tests if their sample files are not available
Dmitry V. Levin [Tue, 18 Apr 2017 23:56:09 +0000 (23:56 +0000)]
tests: skip statfs related tests if their sample files are not available

* tests/xstatfsx.c (print_statfs): Skip the test if open failed.

7 years agotests: extend gen_tests.sh to support arbitrary test_* rules
Dmitry V. Levin [Tue, 18 Apr 2017 23:31:19 +0000 (23:31 +0000)]
tests: extend gen_tests.sh to support arbitrary test_* rules

* tests/gen_tests.sh: Add support of arbitrary test_* rules.

7 years agotests: change gen_tests.sh to read its input as raw input
Dmitry V. Levin [Tue, 18 Apr 2017 23:25:04 +0000 (23:25 +0000)]
tests: change gen_tests.sh to read its input as raw input

* tests/gen_tests.sh: Specify -r option to read.
* tests/gen_tests.in (shmxt): Update.

7 years agostrace.1: s/regex expression/regular expression/
Eugene Syromyatnikov [Mon, 17 Apr 2017 23:07:50 +0000 (01:07 +0200)]
strace.1: s/regex expression/regular expression/

7 years agostrace.1: enhance %statfs description
Dmitry V. Levin [Mon, 17 Apr 2017 20:14:07 +0000 (20:14 +0000)]
strace.1: enhance %statfs description

* strace.1 (.SS Filtering) <%statfs>: Fix the list of syscalls,
add an equivalent regex expression.

7 years agonetlink: decode NLMSG_ERROR messages
Dmitry V. Levin [Mon, 17 Apr 2017 04:37:41 +0000 (04:37 +0000)]
netlink: decode NLMSG_ERROR messages

* netlink.c (decode_nlmsgerr, decode_payload): New functions.
(decode_nlmsghdr_with_payload): Use decode_payload.
* tests/netlink_protocol.c (send_query): Check decoding
of NLMSG_ERROR messages.
* NEWS: Mention this change.

7 years agonetlink: avoid using unaligned sizeof(struct nlmsghdr) unnecessarily
Dmitry V. Levin [Mon, 17 Apr 2017 04:37:29 +0000 (04:37 +0000)]
netlink: avoid using unaligned sizeof(struct nlmsghdr) unnecessarily

* netlink.c (NLMSG_HDRLEN): Redefine.
(decode_nlmsghdr_with_payload, decode_netlink): Use it instead
of sizeof(struct nlmsghdr).

7 years agoFix the length argument passed from print_iovec to decode_netlink
Dmitry V. Levin [Mon, 17 Apr 2017 04:37:11 +0000 (04:37 +0000)]
Fix the length argument passed from print_iovec to decode_netlink

* io.c (print_iovec): Pass the actual length to decode_netlink
instead of the original length.
* NEWS: Mention this fix.

7 years agonuma: fix printing of error values in move_pages status array
Dmitry V. Levin [Mon, 17 Apr 2017 04:36:54 +0000 (04:36 +0000)]
numa: fix printing of error values in move_pages status array

* numa.c (print_status): Do not lose a minus sign when printing
a symbolic error code.
* tests/move_pages.c (print_status_array): Update expected output.

7 years agotests: generate pure_executables part of check_PROGRAMS automatically
Dmitry V. Levin [Mon, 17 Apr 2017 00:53:19 +0000 (00:53 +0000)]
tests: generate pure_executables part of check_PROGRAMS automatically

* tests/gen_pure_executables.sh: New file.
* bootstrap: Invoke it.
* tests/Makefile.am: Include pure_executables.am.
(check_PROGRAMS): Add $(PURE_EXECUTABLES).  Remove everything listed
in pure_executables.list.
(EXTRA_DIST): Add gen_pure_executables.sh.
* tests/.gitignore: Add pure_executables.am.

7 years agotests: make EXTRA_DIST sorted
Dmitry V. Levin [Mon, 17 Apr 2017 00:50:19 +0000 (00:50 +0000)]
tests: make EXTRA_DIST sorted

* tests/Makefile.am (EXTRA_DIST): Sort.

7 years agotests: check decoding of alpha specific osf_utimes syscall
Dmitry V. Levin [Mon, 17 Apr 2017 00:29:58 +0000 (00:29 +0000)]
tests: check decoding of alpha specific osf_utimes syscall

* tests/osf_utimes.c: New file.
* tests/gen_tests.in (osf_utimes): New entry.
* tests/Makefile.am (check_PROGRAMS): Add osf_utimes.
* tests/pure_executables.list: Likewise.
* tests/.gitignore: Likewise.

7 years agotests: parametrize utimes.c
Dmitry V. Levin [Mon, 17 Apr 2017 00:17:00 +0000 (00:17 +0000)]
tests: parametrize utimes.c

* tests/xutimes.c: New file, based on utimes.c.
* tests/utimes.c [__NR_utimes] (TEST_SYSCALL_NR, TEST_SYSCALL_STR,
TEST_STRUCT): New macros.
[__NR_utimes]: Replace all the rest with include "xutimes.c".
* tests/Makefile.am (EXTRA_DIST): Add xutimes.c.

7 years agoalpha: fix tracing flags of osf_select and osf_utimes syscalls
Dmitry V. Levin [Sun, 16 Apr 2017 23:37:13 +0000 (23:37 +0000)]
alpha: fix tracing flags of osf_select and osf_utimes syscalls

* linux/alpha/syscallent.h (osf_select): Add TD flag.
(osf_utimes): Add TF flag.
* NEWS: Mention alpha specific fixes.

7 years agoalpha: rename print_timeval32_pair to print_timeval32_utimes
Dmitry V. Levin [Sun, 16 Apr 2017 23:27:08 +0000 (23:27 +0000)]
alpha: rename print_timeval32_pair to print_timeval32_utimes

This follows the rename of print_timeval_item to print_timeval_utimes.

* defs.h [ALPHA] (print_timeval32_pair): Rename
to print_timeval32_utimes.
* print_timeval.c [ALPHA] (print_timeval32_pair): Likewise.
* utimes.c [ALPHA] (SYS_FUNC(osf_utimes)): Replace print_timeval32_pair
with print_timeval32_utimes.

7 years agotests: do more rigorous testing of utimes syscall parser
Dmitry V. Levin [Sun, 16 Apr 2017 18:47:29 +0000 (18:47 +0000)]
tests: do more rigorous testing of utimes syscall parser

* tests/utimes.c (errstr): New variable.
(print_ts, k_utimes): New functions.
(main): Use them to do more rigorous testing of utimes syscall parser.
* tests/gen_tests.in (utimes): Update -a option.

7 years agotests: do more rigorous testing of futimesat syscall parser
Dmitry V. Levin [Sun, 16 Apr 2017 18:47:29 +0000 (18:47 +0000)]
tests: do more rigorous testing of futimesat syscall parser

* tests/futimesat.c (errstr): New variable.
(print_ts, k_futimesat): New functions.
(main): Use them to do more rigorous testing of futimesat syscall parser.

7 years agoFix printing of inaccessible times argument of utimes and futimesat syscalls
Dmitry V. Levin [Sun, 16 Apr 2017 18:13:27 +0000 (18:13 +0000)]
Fix printing of inaccessible times argument of utimes and futimesat syscalls

When the whole pair of struct timeval structures cannot be fetched from
tracee's memory, print the address.  This behavior follows the kernel's
that uses copy_from_user for the whole pair, too.

* print_timeval.c (print_timeval_item): Remove.
(print_timeval_pair): Rename to print_timeval_utimes, all callers
updated.  Fetch the whole timeval_t array with a single
umove_or_printaddr call.
* tests/futimesat.c (main): Update expected output.
* tests/utimes.c (main): Likewise.

7 years agotests: rewrite utimensat.test without relying on libc utimensat wrapper
Dmitry V. Levin [Sun, 16 Apr 2017 17:28:00 +0000 (17:28 +0000)]
tests: rewrite utimensat.test without relying on libc utimensat wrapper

The new test also does more rigorous testing.

* tests/utimensat.c: Stop including <assert.h> and <errno.h>, include
<unistd.h> and <asm/unistd.h>, check __NR_utimensat instead
of HAVE_UTIMENSAT.
(errstr): New variable.
(k_utimensat): New function, a thin wrapper around
syscall(__NR_utimensat).
(main): Use them instead of utimensat.
* tests/gen_tests.in (utimensat): New entry.
* tests/utimensat.test: Remove.
* tests/Makefile.am (DECODER_TESTS): Remove it.

7 years agotests: use fixed timestamps in utime related tests
Dmitry V. Levin [Sun, 16 Apr 2017 17:28:00 +0000 (17:28 +0000)]
tests: use fixed timestamps in utime related tests

* tests/clock.test: Remove futimesat, utime, utimensat, and utimes tests
from the list of exceptions.
* tests/utime.c (main): Do not use time(), use fixed timestamp instead.
* tests/futimesat.c (main): Do not use gettimeofday(), use fixed
timestamps instead.
* tests/utimensat.c (main): Likewise.
* tests/utimes.c (main): Likewise.

7 years agoxtensa: wire up new syscalls
Dmitry V. Levin [Sat, 15 Apr 2017 13:28:23 +0000 (13:28 +0000)]
xtensa: wire up new syscalls

* linux/xtensa/syscallent.h [348..350]: New pkey_* entries.

Reported-by: Victor Krapivensky <krapivenskiy.va@phystech.edu>
7 years agoUpdate statx parser and syscall entries lists to the upstream
Victor Krapivensky [Sat, 15 Apr 2017 08:43:12 +0000 (11:43 +0300)]
Update statx parser and syscall entries lists to the upstream

* linux/32/syscallent.h [291]: Add statx entry.
* linux/64/syscallent.h [291]: Likewise.
* linux/arm/syscallent.h [397]: Likewise.
* linux/m68k/syscallent.h [379]: Likewise.
* linux/mips/syscallent-n32.h [6330]: Likewise.
* linux/mips/syscallent-n64.h [5326]: Likewise.
* linux/mips/syscallent-o32.h [4366]: Likewise.
* linux/powerpc/syscallent.h [383]: Likewise.
* linux/s390/syscallent.h [379]: Likewise.
* linux/s390x/syscallent.h [379]: Likewise.
* linux/xtensa/syscallent.h [351]: Likewise.
* statx.h (struct_statx): Update.
* statx.c (SYS_FUNC(statx)): Print struct_statx.stx_attributes_mask.
* tests/xstatx.c (print_stat, main): Update to test decoding
of struct_statx.stx_attributes_mask.

7 years agotests: add more regex match checks
Dmitry V. Levin [Fri, 14 Apr 2017 17:47:21 +0000 (17:47 +0000)]
tests: add more regex match checks

* tests/qual_syscall.test: Add regex match checks.

7 years agotests: make mq_sendrecv* test executables reenterable
Dmitry V. Levin [Fri, 14 Apr 2017 16:43:18 +0000 (16:43 +0000)]
tests: make mq_sendrecv* test executables reenterable

* tests/mq_sendrecv.c (MQ_NAME): Remove.
(mq_name): New static variable.
(cleanup): Use it instead of MQ_NAME.
(main): Initialize it dynamically using the pid of process.  Use it
instead of MQ_NAME.

7 years agotests: make mq test executable reenterable
Dmitry V. Levin [Fri, 14 Apr 2017 16:25:05 +0000 (16:25 +0000)]
tests: make mq test executable reenterable

* tests/mq.c (NAME): Remove.
(main): Replace the fixed message queue name with a dynamically
made name containing the pid of process.
* tests/gen_tests.in (mq): Update -a option.

7 years agotests: make net-yy-netlink test executable reenterable
Dmitry V. Levin [Fri, 14 Apr 2017 15:55:21 +0000 (15:55 +0000)]
tests: make net-yy-netlink test executable reenterable

* tests/net-yy-netlink.c (main): Use getpid() instead of a fixed
magic number.

7 years agotests: tabulate shmxt.test
Dmitry V. Levin [Fri, 14 Apr 2017 15:35:21 +0000 (15:35 +0000)]
tests: tabulate shmxt.test

* tests/gen_tests.in (shmxt): New entry.
* tests/shmxt.test: Remove.
* tests/Makefile.am (DECODER_TESTS): Remove shmxt.test.

7 years agoRevert "Implement -e trace=%sched option"
Dmitry V. Levin [Fri, 14 Apr 2017 15:06:42 +0000 (15:06 +0000)]
Revert "Implement -e trace=%sched option"

-e trace=%sched became redundant as -e trace=/sched does the same.

This reverts commit 811638e9c1805438a63c14f9704b8b00ac922623.

* syscall.c (TSC): Remove.
* sysent.h (TRACE_SCHED): Remove.
* qualify.c (lookup_class): Remove %sched.
* strace.1 (.SS Filtering): Likewise.
* NEWS: Likewise.
* linux/32/syscallent.h: Remove TSC flag from sched* syscalls.
* linux/64/syscallent.h: Likewise.
* linux/alpha/syscallent.h: Likewise.
* linux/arm/syscallent.h: Likewise.
* linux/avr32/syscallent.h: Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/crisv10/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/syscallent-n32.h: Likewise.
* linux/mips/syscallent-n64.h: Likewise.
* linux/mips/syscallent-o32.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/powerpc64/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/xtensa/syscallent.h: Likewise.
* tests/sched.test: Replace trace=%sched with trace=/sched.
* tests/ksysent.c (TSC): Remove.
* tests/nsyscalls.c: Likewise.

7 years agoRevert "Implement -e trace=%clock option"
Dmitry V. Levin [Fri, 14 Apr 2017 15:06:42 +0000 (15:06 +0000)]
Revert "Implement -e trace=%clock option"

-e trace=%clock became redundant as -e trace=/clock does the same.

This reverts commit 0a13d2391c413e3847b71ec0c1d38f56e353b1b5.

* syscall.c (TCL): Remove.
* sysent.h (TRACE_CLOCK): Remove.
* qualify.c (lookup_class): Remove %clock.
* strace.1 (.SS Filtering): Likewise.
* NEWS: Likewise.
* linux/32/syscallent.h: Remove TCL flag from clock_* syscalls.
* linux/64/syscallent.h: Likewise.
* linux/alpha/syscallent.h: Likewise.
* linux/arm/syscallent.h: Likewise.
* linux/avr32/syscallent.h: Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/crisv10/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/syscallent-n32.h: Likewise.
* linux/mips/syscallent-n64.h: Likewise.
* linux/mips/syscallent-o32.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/powerpc64/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/xtensa/syscallent.h: Likewise.
* tests/clock.test: Replace trace=%clock with trace=/clock.
* tests/ksysent.c (TCL): Remove.
* tests/nsyscalls.c: Likewise.

7 years agotests: robustify regex.test
Dmitry V. Levin [Fri, 14 Apr 2017 14:53:35 +0000 (14:53 +0000)]
tests: robustify regex.test

* tests/regex.test: Use trace_statfs.test as a template instead
of clock.test and sched.test, not because of more interesting
regular expressions but to fix build on platforms where
clock.test and sched.test are not reenterable.

7 years agoImplement -e trace=/regex option
JingPiao Chen [Fri, 14 Apr 2017 04:27:08 +0000 (12:27 +0800)]
Implement -e trace=/regex option

* qualify.c: Include <regex.h>.
(qualify_syscall_regex): New function.
(qualify_syscall): Use it.
* strace.1: Document -e trace=/regex option.
* NEWS: Mention -e trace=/regex option.
* tests/regex.test: New test.
* tests/Makefile.am (DECODER_TESTS): Add it.
* tests/options-syntax.test: Add checks for invaild regexp
and for regexp that doesn't match a syscall.

7 years agotests: fix ioctl_nsfs.test on hppa
Dmitry V. Levin [Fri, 14 Apr 2017 01:21:19 +0000 (01:21 +0000)]
tests: fix ioctl_nsfs.test on hppa

* tests/ioctl_nsfs.c (test_user_namespace): Specify an address
in the middle of a mapped page as child_stack address argument
of the clone call.
[IA64] (clone): Update.

7 years agotests: fix ioctl_nsfs.test on ia64
Dmitry V. Levin [Fri, 14 Apr 2017 00:52:37 +0000 (00:52 +0000)]
tests: fix ioctl_nsfs.test on ia64

glibc on ia64 provides no clone() function, but there is a __clone2
function instead.  It is documented but no prototype is provided by
glibc.

* tests/ioctl_nsfs.c [IA64] (__clone2): New prototype.
[IA64] (clone): New macro wrapper around __clone2.

7 years agotests: check decoding of the remaining V4L2_BUF_TYPE_* types
Edgar Kaziahmedov [Thu, 13 Apr 2017 23:39:04 +0000 (02:39 +0300)]
tests: check decoding of the remaining V4L2_BUF_TYPE_* types

* tests/ioctl_v4l2.c (init_v4l2_format, print_ioctl_v4l2): New functions
to avoid code duplication in VIDIOC_S_FMT and VIDIOC_TRY_FMT tests.
(main) <VIDIOC_G_FMT, VIDIOC_S_FMT, VIDIOC_TRY_FMT>: Use them.  Add
checks for remaining V4L2_BUF_TYPE_* types.

Signed-off-by: Edgar Kaziahmedov <edos@linux.com>
7 years agov4l2: Implement decoding of the remaining V4L2_BUF_TYPE_* types
Edgar Kaziahmedov [Thu, 13 Apr 2017 23:39:03 +0000 (02:39 +0300)]
v4l2: Implement decoding of the remaining V4L2_BUF_TYPE_* types

* v4l2.c: Include "xlat/v4l2_vbi_flags.h" and "xlat/v4l2_sliced_flags.h".
(struct_v4l2_clip): New typedef.  Mpersify it.
(print_v4l2_clip): New function.
(print_v4l2_format_fmt): Use it.  Add struct tcb argument.  Implement
decoding of the remaining V4L2_BUF_TYPE_* types.
* xlat/v4l2_vbi_flags.in: Add V4L2_VBI_UNSYNC and V4L2_VBI_INTERLACED
introduced by linux kernel commit v2.5.46~39^2~23^2~4.
Add V4L2_VBI_ITU_525_F1_START, V4L2_VBI_ITU_525_F2_START,
V4L2_VBI_ITU_625_F1_START, and V4L2_VBI_ITU_625_F2_START introduced by
linux kernel commit v3.17-rc1~112^2~217.
* xlat/v4l2_sliced_flags.in: Add V4L2_SLICED_TELETEXT_B, V4L2_SLICED_VPS,
V4L2_SLICED_CAPTION_525, V4L2_SLICED_WSS_625, V4L2_SLICED_VBI_525, and
V4L2_SLICED_VBI_625 introduced by linux kernel commit v2.6.14-rc2~64.
* configure.ac (AC_CHECK_DECLS): Add V4L2_BUF_TYPE_SDR_CAPTURE and
V4L2_BUF_TYPE_SDR_OUTPUT.
(AC_CHECK_MEMBERS): Add struct v4l2_window.global_alpha and
struct v4l2_sdr_format.buffersize.
* NEWS: Mention this change.

Signed-off-by: Edgar Kaziahmedov <edos@linux.com>