Commit Graph

4235 Commits

Author SHA1 Message Date
87baaec12e tests/attach-p-cmd-p.c: cleanup
* attach-p-cmd-p.c (handler): Move code ...
(main): ... here.  Unblock SIGALRM only.
Use alarm() instead of setitimer().
Replace endless loop with a pause() call.
Check that chdir() returns ENOENT.
2016-06-10 14:34:32 +00:00
056e304d04 tests: enhance test coverage of SIGCHLD siginfo_t
* tests/siginfo.c: New file.
* tests/siginfo.test: New test.
* tests/wait.c: Remove.
* tests/wait.expected: Remove.
* tests/wait.test: Remove.
* tests/.gitignore: Add siginfo, remove wait.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add siginfo.test, remove wait.test.
(EXTRA_DIST): Remove wait.expected.
2016-06-10 09:56:53 +00:00
176c568a6a tests: extend test coverage of waitid syscall
* tests/waitid.c: New file.
* tests/waitid-v.c: Likewise.
* tests/waitid.test: New test.
* tests/waitid-v.test: Likewise.
* tests/.gitignore: Add waitid and waitid-v.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add waitid.test and waitid-v.test.
2016-06-10 09:16:10 +00:00
1f68abfed3 tests: extend test coverage of wait4 syscall
* tests/wait4.c: New file.
* tests/wait4-v.c: Likewise.
* tests/wait4.test: New test.
* tests/wait4-v.test: Likewise.
* tests/.gitignore: Add wait4 and wait4-v.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add wait4.test and wait4-v.test.
2016-06-10 09:15:59 +00:00
af0d066dc2 tests: add widen_to_ull macro to tests.h
* tests.h (widen_to_ull): New macro, copied from defs.h
2016-06-10 09:14:20 +00:00
70ea46756e Fix sign extension issues in the parser of struct rusage
* printrusage.c (printrusage): Do not cast members of struct rusage
to type long, use widen_to_ull instead.
2016-06-10 01:29:46 +00:00
e9c1ee9c63 tests: check decoding of waitpid syscall
* tests/waitpid.c: New file.
* tests/waitpid.test: New test.
* tests/.gitignore: Add waitpid.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add waitpid.test.
2016-06-09 01:29:45 +00:00
Fei Jie
ef9900e7c1 tests: add strace-E.test
* tests/strace-E.expected: New file.
* tests/strace-E.test: New test.
* tests/Makefile.am (MISC_TESTS): Add it.
(EXTRA_DIST): Add strace-E.expected.
2016-06-09 01:28:33 +00:00
7700272844 strace.spec.in: enable libunwind on more platforms
* strace.spec.in: Add libunwind-devel to BuildRequires for RHEL8 family.
2016-06-08 10:02:42 +00:00
2afa76e29a make-dist: generate strace-*.tar.gz, strace.dsc, and strace.spec
Change make-dist to generate strace-*.tar.gz, strace.dsc,
and strace.spec in addition to strace-*.tar.xz.

* configure.ac (AM_INIT_AUTOMAKE): Remove no-dist-gzip.
* make-dsc: New file.
* make-dist: Use it.
* .gitignore: Add strace-*.tar.gz, strace.dsc, and strace.spec.
2016-06-08 09:28:25 +00:00
669efd8678 Parametrize debian/changelog
* configure.ac (CHANGELOGTIME): Rename to RPM_CHANGELOGTIME.
(DEB_CHANGELOGTIME): New variable.
(AC_CONFIG_FILES): Add debian/changelog.
* strace.spec.in: Rename CHANGELOGTIME to RPM_CHANGELOGTIME.
* debian/changelog: Rename to ...
* debian/changelog.in: ... this file.  Add parametrized entry.
* debian/.gitignore: New file.
2016-06-08 09:28:21 +00:00
83ed8fb33c git-version-gen: replace '-' with '.' in generated version
* git-version-gen: Replace '-' with '.' so version conforms to policies
* configure.ac (SPEC_VERSION): Remove.
* strace.spec.in: Replace SPEC_VERSION with PACKAGE_VERSION.
Remove %srcname.
2016-06-08 00:27:22 +00:00
e2b3df2501 Parametrize strace.spec
* configure.ac (SPEC_VERSION, CHANGELOGTIME): Define.
(AC_CONFIG_FILES): Add strace.spec.
* strace.spec: Rename to ...
* strace.spec.in: ... this file.  Parametrize Version, srcname,
and the last %changelog entry.  Initialize .tarball-version file.
2016-06-07 18:16:41 +00:00
934809d69d strace.spec: adopt for OBS
* strace.spec: Parametrize libunwind-devel BRs, BuildRoot, and %defattr.
2016-06-07 18:16:41 +00:00
07d9cf589c tests: remove obsolete strace-f.test
strace-f.test is too inexact while fork-f.test does the right thing.

* tests/strace-f.test: Remove.
* tests/Makefile.am (MISC_TESTS): Remove it.
* strace.spec (BuildRequires): Remove time.
2016-06-07 18:16:26 +00:00
b1dbd9e291 tests: always distribute strace-k.test
Fix distribution of tests/strace-k.test file when configured
without libunwind.

* tests/Makefile.am (EXTRA_DIST): Add strace-k.test.
2016-06-07 09:32:17 +00:00
79ccf4389e make-dist: skip news-check for non-releases
* make-dist: Run news-check only when the commit being built
matches a release tag.
2016-06-07 09:19:21 +00:00
4e085d0b46 tests: check decoding of setrlimit, getrlimit, and ugetrlimit syscalls
* tests/getrlimit.c: New file.
* tests/setrlimit.c: Likewise.
* tests/ugetrlimit.c: Likewise.
* tests/xgetrlimit.c: Likewise.
* tests/getrlimit.test: New test.
* tests/setrlimit.test: Likewise.
* tests/ugetrlimit.test: Likewise.
* tests/.gitignore: Add getrlimit, setrlimit, and ugetrlimit.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add getrlimit.test, setrlimit.test,
and ugetrlimit.test.
(EXTRA_DIST): Add xgetrlimit.c.
2016-06-06 22:06:46 +00:00
b017c09ab3 tests: check decoding of prlimit64 syscall
* tests/prlimit64.c: New file.
* tests/prlimit64.test: New test.
* tests/.gitignore: Add prlimit64.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add prlimit64.test.
2016-06-06 21:25:54 +00:00
b50623bd58 Fix decoding of pid_t argument of prlimit64 syscall
* resource.c (SYS_FUNC(prlimit64)): Print pid_t syscall
argument using %d format.
2016-06-06 21:25:36 +00:00
900503c90d Do not check for old sysctl enums
Assume that sysctl enums defined since linux v2.6 are always defined,
with a signle exception: check for CTL_PROC which definition was removed
in v2.6.18 and restored later in v2.6.23.

* configure.ac (AC_CHECK_DECLS): Remove old constants.
* xlat/sysctl_kern.in: Mark constants older than KERN_PRINTK_RATELIMIT
as unconditional.
* xlat/sysctl_net.in: Mark constants older than NET_LLC
as unconditional.
* xlat/sysctl_net_core.in: Mark constants older than NET_CORE_BUDGET
as unconditional.
* xlat/sysctl_net_ipv4.in: Mark constants older than
NET_IPV4_IGMP_MAX_MSF as unconditional.
* xlat/sysctl_net_ipv4_conf.in: Mark constants older than
NET_IPV4_CONF_FORCE_IGMP_VERSION as unconditional.
* xlat/sysctl_net_ipv4_route.in: Mark constants older than
NET_IPV4_ROUTE_GC_MIN_INTERVAL_MS as unconditional.
* xlat/sysctl_net_ipv6.in: Mark constants older than
NET_IPV6_MLD_MAX_MSF as unconditional.
* xlat/sysctl_net_ipv6_route.in: Mark constants older than
NET_IPV6_ROUTE_GC_MIN_INTERVAL_MS as unconditional.
* xlat/sysctl_net_unix.in: Mark all constants as unconditional.
* xlat/sysctl_root.in: Mark constants older than CTL_ARLAN
as unconditional.
* xlat/sysctl_vm.in: Mark constants older than VM_MAX_MAP_COUNT
as unconditional.
2016-06-06 18:07:04 +00:00
0e2c5e226b xlat: extend syntax
* xlat/gen.sh: Implement #conditional directive that turns on
preprocessor checks turned off earlier by #unconditional directive.
2016-06-06 18:07:04 +00:00
Elvira Khabirova
a840a14f1f mpers.awk: remove unnecessary type attribute retrieval
* mpers.awk (what_is): Do not retrieve "type" attribute
for "enumeration_type".
2016-06-06 18:07:04 +00:00
Elvira Khabirova
f6be7ae12c tests/ptrace.c: fix fork() return value check
* tests/ptrace.c (test_peeksiginfo): Explicitly cast fork() return value
to pid_t.
2016-06-06 18:07:04 +00:00
Elvira Khabirova
2d2f0a7998 .gitignore: add missing files that should be ignored
* .gitignore: Add ioctl_redefs[12].h and libstrace.a.
2016-06-06 18:07:04 +00:00
3f0c68b05e debian: sync with the package
* debian/control (Build-Depends) [amd64]: Remove libunwind-dev.
* debian/changelog: Sync with 4.12-3.
* debian/rules: Likewise.
2016-06-06 18:07:04 +00:00
f56323f1cc tests/strace-S.test: fix testing 64-bit strace using a 32-bit userspace
* tests/strace-S.test: Measure wall clock time instead of system time.
Use local "./readv" instead of system "date" as a sample executable.

Reported-by: Steve McIntyre <steve@einval.com>
2016-06-06 18:07:04 +00:00
53128b6746 tests/strace-S.test: enhance error diagnostics
* tests/strace-S.test: If strace output does not meet expectations,
print the output.
2016-06-06 18:07:04 +00:00
bad45d5168 .gitignore: sort the list of ignored patterns
* .gitignore: Sort.
2016-06-02 22:59:20 +00:00
5577dd2ff7 maint: post-release administrivia
* NEWS: Add header line for the next release.
2016-06-01 23:56:14 +00:00
ed1f206551 Prepare for 4.12 release
* NEWS: Update for 4.12 release.
* debian/changelog: 4.12-1.
* strace.spec: 4.12-1.
2016-05-31 11:12:13 +00:00
3ce8e9f1b1 Sync strace.spec and debian/changelog with packages
* debian/changelog: Sync with 4.11-1.
* strace.spec: Sync with 4.11.0.163.9720-2.
2016-05-31 10:47:53 +00:00
bb9d6835a6 Mpersify hdio.c
* defs.h (hdio_ioctl): Remove.
* hdio.c: Mpersify struct hd_geometry.
(hdio_ioctl): Mpersify.
2016-05-30 00:29:14 +00:00
4b9fa902d2 loop.c: decode LOOP_SET_DIRECT_IO
* loop.c (loop_ioctl) [LOOP_SET_DIRECT_IO] : Handle LOOP_SET_DIRECT_IO.
2016-05-29 22:58:56 +00:00
b7166a6f28 loop.c: fix printing of arrays
* loop.c (decode_loop_info): Use square brackets to print
struct loop_info.lo_init and struct loop_info.reserved arrays.
(decode_loop_info64): Use square brackets to print
struct loop_info64.lo_init array.
2016-05-29 22:34:30 +00:00
25129acea0 loop.c: fix printing of structure members' names
* loop.c (decode_loop_info, decode_loop_info64): Do not strip "lo_"
prefix from printed names.
2016-05-29 22:28:28 +00:00
bece24d1c6 loop.c: optimize decoding of paired ioctls
* loop.c (loop_ioctl): Optimize decoding of LOOP_[GS]ET_STATUS
and LOOP_[GS]ET_STATUS64 ioctl pairs.
2016-05-29 22:15:53 +00:00
124c17ad3c tests/ioctl_evdev.c: check EVIOCGUNIQ decoding
* tests/ioctl_evdev.c (main): Check EVIOCGUNIQ(0) decoding.
2016-05-28 22:13:27 +00:00
bd090efc40 tests/ioctl_mtd.c: fix build with musl
* tests/ioctl_mtd.c: Include <linux/ioctl.h>.
2016-05-28 19:55:01 +00:00
129b304c95 tests: check decoding of 'M' type ioctls
* tests/ioctl_mtd.c: New file.
* tests/ioctl_mtd.test: New test.
* tests/.gitignore: Add ioctl_mtd.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add ioctl_mtd.test.
2016-05-28 19:31:50 +00:00
a0866bce35 Mpersify mtd.c
* defs.h (mtd_ioctl): Remove.
* mtd.c: Mpersify struct mtd_oob_buf and ioctl numbers.
(mtd_ioctl): Mpersify.
2016-05-28 19:16:32 +00:00
0a27c814b2 mtd.c: refactor
* mtd.c (mtd_ioctl): Move parsers of structures to separate functions.
2016-05-28 19:16:28 +00:00
5104db4e60 Move parser of UBI_* ioctls to a separate file
* mtd.c (ubi_ioctl): Move to ...
* ubi.c: ... new file.
* Makefile.am (strace_SOURCES): Add it.
2016-05-28 10:29:30 +00:00
fc0a38612f tests: check decoding of EVIOC* ioctls
* tests/ioctl_evdev.c: New file.
* tests/ioctl_evdev-v.c: Likewise.
* tests/ioctl_evdev.test: New test.
* tests/ioctl_evdev-v.test: Likewise.
* tests/.gitignore: Add ioctl_evdev and ioctl_evdev-v.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add ioctl_evdev.test and ioctl_evdev-v.test.
2016-05-28 00:56:47 +00:00
43c8a5d0e8 Mpersify EVIOC* ioctl parser
* defs.h (evdev_abs): New xlat prototype.
(evdev_ioctl): Remove.
* evdev.c: Do not include "xlat/evdev_abs.h".
Mpersify struct ff_effect and ioctl numbers.
(evdev_ioctl): Mpersify.
* NEWS: Mention this enhancement.
2016-05-28 00:56:47 +00:00
aa21c07f2e evdev.c: fix printing of unrecognized event type passed to EVIOCGBIT
* evdev.c (bit_ioctl): If event type is not unrecognized,
print the argument as an address.
2016-05-28 00:56:47 +00:00
47be9f2597 evdev.c: fix printing of EV_PWR's argument
* evdev.c (bit_ioctl): Fix printing of comma before EV_PWR's argument.
2016-05-28 00:56:47 +00:00
3f23c0c79f evdev.c: fix indentation
* evdev.c: Fix indentation of print formats.
2016-05-28 00:56:47 +00:00
10de2eb030 evdev.c: fix decoding of EVIOCGNAME, EVIOCGPHYS, and EVIOCGUNIQ
* evdev.c (evdev_read_ioctl): Fix printing of the string returned
in response to EVIOCGNAME, EVIOCGPHYS, and EVIOCGUNIQ requests.
2016-05-28 00:56:47 +00:00
b29569aa1d evdev.c: fix EVIOCGVERSION decoding
* evdev.c (evdev_read_ioctl): Print EVIOCGVERSION's argument
using #x format.
2016-05-28 00:56:47 +00:00