]>
granicus.if.org Git - strace/log
Dmitry V. Levin [Fri, 10 Jun 2016 09:15:59 +0000 (09:15 +0000)]
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.
Dmitry V. Levin [Fri, 10 Jun 2016 09:13:32 +0000 (09:13 +0000)]
tests: add widen_to_ull macro to tests.h
* tests.h (widen_to_ull): New macro, copied from defs.h
Dmitry V. Levin [Fri, 10 Jun 2016 01:27:45 +0000 (01:27 +0000)]
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.
Dmitry V. Levin [Thu, 9 Jun 2016 01:29:45 +0000 (01:29 +0000)]
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.
Fei Jie [Wed, 8 Jun 2016 02:31:29 +0000 (10:31 +0800)]
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.
Dmitry V. Levin [Wed, 8 Jun 2016 10:02:42 +0000 (10:02 +0000)]
strace.spec.in: enable libunwind on more platforms
* strace.spec.in: Add libunwind-devel to BuildRequires for RHEL8 family.
Dmitry V. Levin [Wed, 8 Jun 2016 00:32:22 +0000 (00:32 +0000)]
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.
Dmitry V. Levin [Wed, 8 Jun 2016 00:32:09 +0000 (00:32 +0000)]
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.
Dmitry V. Levin [Wed, 8 Jun 2016 00:23:28 +0000 (00:23 +0000)]
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.
Dmitry V. Levin [Tue, 7 Jun 2016 18:04:53 +0000 (18:04 +0000)]
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.
Dmitry V. Levin [Tue, 7 Jun 2016 18:03:21 +0000 (18:03 +0000)]
strace.spec: adopt for OBS
* strace.spec: Parametrize libunwind-devel BRs, BuildRoot, and %defattr.
Dmitry V. Levin [Tue, 7 Jun 2016 17:52:53 +0000 (17:52 +0000)]
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.
Dmitry V. Levin [Tue, 7 Jun 2016 09:32:17 +0000 (09:32 +0000)]
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.
Dmitry V. Levin [Tue, 7 Jun 2016 09:17:12 +0000 (09:17 +0000)]
make-dist: skip news-check for non-releases
* make-dist: Run news-check only when the commit being built
matches a release tag.
Dmitry V. Levin [Mon, 6 Jun 2016 21:26:08 +0000 (21:26 +0000)]
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.
Dmitry V. Levin [Mon, 6 Jun 2016 21:25:54 +0000 (21:25 +0000)]
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.
Dmitry V. Levin [Mon, 6 Jun 2016 21:25:36 +0000 (21:25 +0000)]
Fix decoding of pid_t argument of prlimit64 syscall
* resource.c (SYS_FUNC(prlimit64)): Print pid_t syscall
argument using %d format.
Dmitry V. Levin [Mon, 6 Jun 2016 15:39:11 +0000 (15:39 +0000)]
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.
Dmitry V. Levin [Mon, 6 Jun 2016 15:08:45 +0000 (15:08 +0000)]
xlat: extend syntax
* xlat/gen.sh: Implement #conditional directive that turns on
preprocessor checks turned off earlier by #unconditional directive.
Elvira Khabirova [Mon, 6 Jun 2016 01:57:59 +0000 (04:57 +0300)]
mpers.awk: remove unnecessary type attribute retrieval
* mpers.awk (what_is): Do not retrieve "type" attribute
for "enumeration_type".
Elvira Khabirova [Sun, 5 Jun 2016 23:39:59 +0000 (02:39 +0300)]
tests/ptrace.c: fix fork() return value check
* tests/ptrace.c (test_peeksiginfo): Explicitly cast fork() return value
to pid_t.
Elvira Khabirova [Mon, 6 Jun 2016 00:24:19 +0000 (03:24 +0300)]
.gitignore: add missing files that should be ignored
* .gitignore: Add ioctl_redefs[12].h and libstrace.a.
Dmitry V. Levin [Sun, 5 Jun 2016 23:08:58 +0000 (23:08 +0000)]
debian: sync with the package
* debian/control (Build-Depends) [amd64]: Remove libunwind-dev.
* debian/changelog: Sync with 4.12-3.
* debian/rules: Likewise.
Dmitry V. Levin [Sat, 4 Jun 2016 23:40:40 +0000 (23:40 +0000)]
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>
Dmitry V. Levin [Fri, 3 Jun 2016 23:46:27 +0000 (23:46 +0000)]
tests/strace-S.test: enhance error diagnostics
* tests/strace-S.test: If strace output does not meet expectations,
print the output.
Dmitry V. Levin [Thu, 2 Jun 2016 22:59:20 +0000 (22:59 +0000)]
.gitignore: sort the list of ignored patterns
* .gitignore: Sort.
Dmitry V. Levin [Wed, 1 Jun 2016 23:56:14 +0000 (23:56 +0000)]
maint: post-release administrivia
* NEWS: Add header line for the next release.
Dmitry V. Levin [Tue, 31 May 2016 11:12:13 +0000 (11:12 +0000)]
Prepare for 4.12 release
* NEWS: Update for 4.12 release.
* debian/changelog: 4.12-1.
* strace.spec: 4.12-1.
Dmitry V. Levin [Tue, 31 May 2016 10:47:53 +0000 (10:47 +0000)]
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.
Dmitry V. Levin [Mon, 30 May 2016 00:25:03 +0000 (00:25 +0000)]
Mpersify hdio.c
* defs.h (hdio_ioctl): Remove.
* hdio.c: Mpersify struct hd_geometry.
(hdio_ioctl): Mpersify.
Dmitry V. Levin [Sun, 29 May 2016 22:58:56 +0000 (22:58 +0000)]
loop.c: decode LOOP_SET_DIRECT_IO
* loop.c (loop_ioctl) [LOOP_SET_DIRECT_IO] : Handle LOOP_SET_DIRECT_IO.
Dmitry V. Levin [Sun, 29 May 2016 22:34:30 +0000 (22:34 +0000)]
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.
Dmitry V. Levin [Sun, 29 May 2016 22:28:28 +0000 (22:28 +0000)]
loop.c: fix printing of structure members' names
* loop.c (decode_loop_info, decode_loop_info64): Do not strip "lo_"
prefix from printed names.
Dmitry V. Levin [Sun, 29 May 2016 22:15:53 +0000 (22:15 +0000)]
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.
Dmitry V. Levin [Sat, 28 May 2016 22:12:32 +0000 (22:12 +0000)]
tests/ioctl_evdev.c: check EVIOCGUNIQ decoding
* tests/ioctl_evdev.c (main): Check EVIOCGUNIQ(0) decoding.
Dmitry V. Levin [Sat, 28 May 2016 19:55:01 +0000 (19:55 +0000)]
tests/ioctl_mtd.c: fix build with musl
* tests/ioctl_mtd.c: Include <linux/ioctl.h>.
Dmitry V. Levin [Sat, 28 May 2016 18:49:47 +0000 (18:49 +0000)]
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.
Dmitry V. Levin [Sat, 28 May 2016 18:46:39 +0000 (18:46 +0000)]
Mpersify mtd.c
* defs.h (mtd_ioctl): Remove.
* mtd.c: Mpersify struct mtd_oob_buf and ioctl numbers.
(mtd_ioctl): Mpersify.
Dmitry V. Levin [Sat, 28 May 2016 18:42:50 +0000 (18:42 +0000)]
mtd.c: refactor
* mtd.c (mtd_ioctl): Move parsers of structures to separate functions.
Dmitry V. Levin [Sat, 28 May 2016 10:29:30 +0000 (10:29 +0000)]
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.
Dmitry V. Levin [Sat, 28 May 2016 00:51:45 +0000 (00:51 +0000)]
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.
Dmitry V. Levin [Fri, 27 May 2016 00:49:08 +0000 (00:49 +0000)]
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.
Dmitry V. Levin [Sat, 28 May 2016 00:49:17 +0000 (00:49 +0000)]
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.
Dmitry V. Levin [Sat, 28 May 2016 00:12:01 +0000 (00:12 +0000)]
evdev.c: fix printing of EV_PWR's argument
* evdev.c (bit_ioctl): Fix printing of comma before EV_PWR's argument.
Dmitry V. Levin [Fri, 27 May 2016 00:42:25 +0000 (00:42 +0000)]
evdev.c: fix indentation
* evdev.c: Fix indentation of print formats.
Dmitry V. Levin [Fri, 27 May 2016 00:42:18 +0000 (00:42 +0000)]
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.
Dmitry V. Levin [Fri, 27 May 2016 00:42:07 +0000 (00:42 +0000)]
evdev.c: fix EVIOCGVERSION decoding
* evdev.c (evdev_read_ioctl): Print EVIOCGVERSION's argument
using #x format.
Dmitry V. Levin [Fri, 27 May 2016 00:41:59 +0000 (00:41 +0000)]
evdev.c: fix EVIOCGMTSLOTS decoding
* evdev.c (mtslots_ioctl): Use umove_or_printaddr.
Dmitry V. Levin [Fri, 27 May 2016 00:41:51 +0000 (00:41 +0000)]
evdev.c: fix bitset decoding
* evdev.c (decode_bitset): Use umove_or_printaddr.
Dmitry V. Levin [Fri, 27 May 2016 00:41:43 +0000 (00:41 +0000)]
evdev.c: fix decoding of struct input_id
* evdev.c (getid_ioctl): Use umove_or_printaddr.
Dmitry V. Levin [Fri, 27 May 2016 00:41:34 +0000 (00:41 +0000)]
evdev.c: fix decoding of struct input_keymap_entry
* evdev.c (keycode_V2_ioctl): Use umove_or_printaddr.
Dmitry V. Levin [Fri, 27 May 2016 00:41:25 +0000 (00:41 +0000)]
evdev.c: fix decoding of EVIOCGKEYCODE/EVIOCSKEYCODE
* evdev.c (keycode_ioctl): Use umove_or_printaddr.
Dmitry V. Levin [Fri, 27 May 2016 00:41:14 +0000 (00:41 +0000)]
evdev.c: fix decoding of struct input_absinfo
* evdev.c (abs_ioctl): Use umove_or_printaddr.
Dmitry V. Levin [Fri, 27 May 2016 00:41:02 +0000 (00:41 +0000)]
evdev.c: fix decoding of struct ff_effect
* evdev.c (ff_effect_ioctl): Use umove_or_printaddr.
Fix printing of struct ff_effect.u member names.
Dmitry V. Levin [Fri, 27 May 2016 00:40:53 +0000 (00:40 +0000)]
evdev.c: fix printing of struct ff_envelope.fade_level
* evdev.c (decode_envelope): Print struct ff_envelope.fade_level
using #x format.
Dmitry V. Levin [Fri, 27 May 2016 00:40:45 +0000 (00:40 +0000)]
evdev.c: fix decoding of EVIOCGRAB and EVIOCREVOKE
* evdev.c (evdev_write_ioctl): Print argument of EVIOCGRAB
and EVIOCREVOKE as unsigned long.
Dmitry V. Levin [Fri, 27 May 2016 00:40:27 +0000 (00:40 +0000)]
evdev.c: fix EVIOCRMFF decoding
* evdev.c (evdev_write_ioctl): Print EVIOCRMFF's argument as int.
Dmitry V. Levin [Fri, 27 May 2016 00:40:18 +0000 (00:40 +0000)]
evdev.c: move handling of EVIOCGBIT to a separate function
* evdev.c (evdev_read_ioctl): Move EVIOCGBIT handling to ...
(bit_ioctl): ... new function.
Dmitry V. Levin [Fri, 27 May 2016 00:40:10 +0000 (00:40 +0000)]
evdev.c: reorder ioctl command checks
Change the order of ioctl command cheks to match the kernel:
1st, check for fixed-number fixed-length commands,
2nd, check for fixed-number variable-length commands,
3rd, check for multi-number fixed-length commands,
4thm check for multi-number variable-length commands.
* evdev.c (evdev_read_ioctl, evdev_write_ioctl): Reorder
ioctl command checks.
Dmitry V. Levin [Fri, 27 May 2016 00:40:02 +0000 (00:40 +0000)]
evdev.c: decode all directions except _IOC_READ on entering syscall
* evdev.c (evdev_write_ioctl): Remove exiting check.
(evdev_read_ioctl): Move entering check ...
(evdev_ioctl): ... here. Add RVAL_DECODED to return code in _IOC_WRITE
and default cases.
Dmitry V. Levin [Fri, 27 May 2016 00:39:33 +0000 (00:39 +0000)]
evdev.c: fix indentation of preprocessor directives
* evdev.c: Fix indentation of preprocessor directives.
Move inclusion of <linux/ioctl.h> into [HAVE_LINUX_INPUT_H].
Jeff Mahoney [Fri, 27 May 2016 20:07:22 +0000 (16:07 -0400)]
file_ioctl.c: print first two extents for FIDEDUPERANGE in abbrev mode
* file_ioctl.c (file_ioctl, print_file_dedupe_range_info): Print first
two elements of info array in abbrev mode.
* tests/btrfs.c (btrfs_test_extent_same_ioctl): Handle newly
printed elements.
Dmitry V. Levin [Fri, 27 May 2016 01:11:40 +0000 (01:11 +0000)]
ioctl.c: fix typo in decoding of EVIOCSABS's parameter
* ioctl.c (evdev_decode_number): Fix typo in printxval default value.
Jeff Mahoney [Fri, 27 May 2016 03:33:06 +0000 (23:33 -0400)]
tests: check decoding of btrfs RDWR ioctls returned data
* tests/btrfs-vw.test: New file.
* tests/btrfs-w.test: New file.
* tests/Makefile.am (DECODER_TESTS): Add them.
Jeff Mahoney [Fri, 27 May 2016 03:33:05 +0000 (23:33 -0400)]
tests/btrfs.c: fix live btrfs_test_search_ioctls output
* tests/btrfs.c (btrfs_test_search_ioctls): Use print_tree_search_buf
for BTRFS_IOC_TREE_SEARCH and fix missing whitespace.
Jeff Mahoney [Fri, 27 May 2016 03:33:04 +0000 (23:33 -0400)]
btrfs.c: don't use print_array in btrfs_print_tree_search
* btrfs.c (btrfs_print_tree_search): Don't use print_array. The buffer
represents a series of variable sized records, not an array.
Jeff Mahoney [Fri, 27 May 2016 03:33:03 +0000 (23:33 -0400)]
btrfs.c: fix print_array usage in btrfs_print_logical_ino_container
* btrfs.c: (btrfs_print_logical_ino_container) Fix the element count
to reflect the number of records rather than the number of items.
Jeff Mahoney [Thu, 26 May 2016 20:09:28 +0000 (16:09 -0400)]
tests/btrfs.c: fix btrfs-v for BTRFS_IOC_TREE_SEARCH
* tests/btrfs.c (btrfs_test_send_ioctl): Assign key_reference
to search_args for BTRFS_IOC_TREE_SEARCH ioctl tests.
Fabien Siron [Thu, 26 May 2016 15:29:41 +0000 (15:29 +0000)]
Fix -yy documentation
* strace.c (usage): Fix description of -yy option.
* strace.1: Likewise.
Dmitry V. Levin [Thu, 26 May 2016 15:16:31 +0000 (15:16 +0000)]
tests/ioctl_block.c: tweak magic constants to make the test more reliable
* tests/ioctl_block.c (main): Change bad pointer to make
its lower 32-bit part closer to -1U.
Dmitry V. Levin [Thu, 26 May 2016 14:26:15 +0000 (14:26 +0000)]
tests/btrfs.c: check basic decoding of read-only ioctls
* tests/btrfs.c (btrfs_test_read_ioctls): New function.
(main): Use it.
Dmitry V. Levin [Thu, 26 May 2016 12:55:41 +0000 (12:55 +0000)]
tests: check decoding of BLK* ioctls
* configure.ac (AC_CHECK_TYPES): Add struct blk_user_trace_setup.
* tests/ioctl_block.c: New file.
* tests/ioctl_block.test: New test.
* tests/.gitignore: Add ioctl_block.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add ioctl_block.test.
Dmitry V. Levin [Thu, 26 May 2016 10:43:51 +0000 (10:43 +0000)]
Mpersify BLK* ioctl parser
* defs.h (block_ioctl): Remove.
* block.c: Mpersify struct blk_user_trace_setup,
struct blkpg_ioctl_arg, struct blkpg_partition, and ioctl numbers.
(block_ioctl): Mpersify.
* NEWS: Mention this enhancement.
Dmitry V. Levin [Thu, 26 May 2016 12:36:56 +0000 (12:36 +0000)]
block.c: optimize decoding of paired ioctls
* block.c (block_ioctl): Optimize decoding of commands that return
a signed int.
Dmitry V. Levin [Thu, 26 May 2016 12:33:21 +0000 (12:33 +0000)]
block.c: fix printing of uint64_t pairs
* block.c (block_ioctl): Print uint64_t values using PRIu64 format.
Dmitry V. Levin [Thu, 26 May 2016 10:04:39 +0000 (10:04 +0000)]
block.c: fix printing of struct blk_user_trace_setup
* block.c (block_ioctl): Fix printing of comma before
struct blk_user_trace_setup.name on exiting syscall.
Dmitry V. Levin [Thu, 26 May 2016 00:37:26 +0000 (00:37 +0000)]
Move parser of 'X' type ioctls to a separate file
* fs_x_ioctl.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* block.c: (block_ioctl): Move parser of FITRIM, FIFREEZE, and FITHAW
to fs_x_ioctl.c.
* defs.h (fs_x_ioctl): New prototype.
* ioctl.c (ioctl_decode): Call fs_x_ioctl for ioctl type 'X'.
Dmitry V. Levin [Thu, 26 May 2016 00:07:17 +0000 (00:07 +0000)]
Move parser of HDIO_* ioctls to a separate file
* hdio.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* block.c: Do not include <linux/hdreg.h>.
(block_ioctl): Move parser of HDIO_GETGEO to hdio.c.
* defs.h (hdio_ioctl): New prototype.
* ioctl.c (ioctl_decode): Call hdio_ioctl for ioctl type 0x03.
Dmitry V. Levin [Thu, 26 May 2016 10:12:17 +0000 (10:12 +0000)]
Fix explicit casts of signed integer types to unsigned long long
* defs.h (widen_to_ull): New macro.
* dirent.c (print_old_dirent, SYS_FUNC(getdents)): Use it in place
of explicit casts to unsigned long long.
* io.c (print_lld_from_low_high_val): Likewise.
* lseek.c (SYS_FUNC(llseek)): Likewise.
* printsiginfo.c (print_si_info): Likewise.
* printstat.h (DO_PRINTSTAT): Likewise.
* sysinfo.c (SYS_FUNC(sysinfo)): Likewise.
* times.c (SYS_FUNC(times)): Likewise.
* fetch_struct_statfs.c (ASSIGN_NUMBER): Remove.
(fetch_struct_statfs, fetch_struct_statfs64): Replace ASSIGN_NUMBER
with widen_to_ull.
Dmitry V. Levin [Thu, 26 May 2016 10:07:36 +0000 (10:07 +0000)]
scsi.c: print __u64 types using PRI__u64 format
* scsi.c (print_sg_io_v4_req, print_sg_io_v4_res): Remove explicit casts
to unsigned long long, print fields of type __u64 using PRI__u64 format.
Dmitry V. Levin [Wed, 25 May 2016 15:44:32 +0000 (15:44 +0000)]
tests: check decoding of RTC_* ioctls
* configure.ac (AC_CHECK_FUNCS): Add ioctl_rtc.
* tests/ioctl_rtc.c: New file.
* tests/ioctl_rtc-v.c: Likewise.
* tests/ioctl_rtc.test: New test.
* tests/ioctl_rtc-v.test: Likewise.
* tests/.gitignore: Add ioctl_rtc and ioctl_rtc-v.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add ioctl_rtc.test and ioctl_rtc-v.test.
Dmitry V. Levin [Wed, 25 May 2016 15:59:27 +0000 (15:59 +0000)]
Mpersify RTC_* ioctl parser
* defs.h (rtc_ioctl): Remove.
* rtc.c: Mpersify struct rtc_pll_info and ioctl numbers.
(rtc_ioctl): Mpersify.
* NEWS: Mention this enhancement.
Dmitry V. Levin [Wed, 25 May 2016 15:28:23 +0000 (15:28 +0000)]
rtc.c: fix decoding of struct rtc_wkalrm
* rtc.c (decode_rtc_wkalrm): Print field name of struct rtc_wkalrm.time.
Dmitry V. Levin [Wed, 25 May 2016 07:59:13 +0000 (07:59 +0000)]
file_ioctl.c: print file descriptors using printfd
* file_ioctl.c (print_file_dedupe_range_info): Print
struct file_dedupe_range_info.dest_fd using printfd.
(file_ioctl): Print struct file_clone_range.src_fd using printfd.
Dmitry V. Levin [Wed, 25 May 2016 07:44:19 +0000 (07:44 +0000)]
rtc.c: do not print argument of ioctls that have no arguments
* rtc.c (rtc_ioctl): Do not print argument of RTC_{A,U,P,W}IE_{ON,OFF}
and RTC_VL_CLR ioctls.
Dmitry V. Levin [Wed, 25 May 2016 07:43:15 +0000 (07:43 +0000)]
rtc.c: decode RTC_PLL_GET and RTC_PLL_SET
* rtc.c (rtc_ioctl): Decode RTC_PLL_GET and RTC_PLL_SET
Dmitry V. Levin [Wed, 25 May 2016 07:37:44 +0000 (07:37 +0000)]
rtc.c: optimize decoding of paired ioctls
* rtc.c (rtc_ioctl): Optimize decoding of RTC_ALM_READ/RTC_ALM_SET,
RTC_RD_TIME/RTC_SET_TIME, and RTC_WKALM_RD/RTC_WKALM_SET ioctl pairs.
Dmitry V. Levin [Wed, 25 May 2016 07:33:02 +0000 (07:33 +0000)]
block.c: handle BLKDAXGET
* block.c [!BLKDAXGET] (BLKDAXGET): Define.
(block_ioctl): Handle it.
Dmitry V. Levin [Wed, 25 May 2016 00:11:37 +0000 (00:11 +0000)]
tests: check decoding of mount syscall
* tests/mount.c: New file.
* tests/mount.test: New test.
* tests/.gitignore: Add mount.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add mount.
Dmitry V. Levin [Tue, 24 May 2016 20:12:25 +0000 (20:12 +0000)]
tests/vhangup.c: diassociate from the controlling terminal first
* tests/vhangup.c (main): Call setsid before vhangup.
Fei Jie [Thu, 19 May 2016 07:58:37 +0000 (15:58 +0800)]
tests: add vhangup.test
* tests/vhangup.c: New file.
* tests/vhangup.test: New test.
* tests/.gitignore: Add vhangup.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add vhangup.test.
Dmitry V. Levin [Tue, 24 May 2016 18:11:47 +0000 (18:11 +0000)]
NEWS: Prepare for 4.12 release
Gleb Fotengauer-Malinovskiy [Tue, 24 May 2016 15:09:46 +0000 (18:09 +0300)]
tests/btrfs.c: fix build on x32
* tests/btrfs.c (btrfs_test_ino_path_ioctls): Fix printing of st_ino.
Dmitry V. Levin [Tue, 24 May 2016 02:56:39 +0000 (02:56 +0000)]
tests/btrfs.c: fix build with u64 based BTRFS_IOC_DEFAULT_SUBVOL
* tests/btrfs.c: Fix build on systems where BTRFS_IOC_DEFAULT_SUBVOL
is defined using unexported type "u64".
Dmitry V. Levin [Tue, 24 May 2016 02:40:13 +0000 (02:40 +0000)]
btrfs.c: fix build on systems without BTRFS_IOC_FILE_EXTENT_SAME
* btrfs.c (btrfs_ioctl): Skip BTRFS_IOC_FILE_EXTENT_SAME case
if this constant is not defined.
* tests/btrfs.c (btrfs_test_extent_same_ioctl): Skip this part
of the test if BTRFS_IOC_FILE_EXTENT_SAME is not defined.
Dmitry V. Levin [Tue, 24 May 2016 02:17:49 +0000 (02:17 +0000)]
tests/btrfs.c: fix printing struct btrfs_ioctl_clone_range_args
* tests/btrfs.c (btrfs_test_clone_ioctls): Print __u64 members
of struct btrfs_ioctl_clone_range_args using PRI__u64 format.
Dmitry V. Levin [Tue, 24 May 2016 02:07:47 +0000 (02:07 +0000)]
tests/btrfs.c: tweak magic constants to make the test more reliable
* tests/btrfs.c (btrfs_test_sync_ioctls): Change u64val
to 0xdeadbeefbadc0ded.
(btrfs_test_subvol_ioctls): Likewise. Change bad_pointer
to make their lower 32-bit parts closer to -1U.
Dmitry V. Levin [Tue, 24 May 2016 01:53:02 +0000 (01:53 +0000)]
btrfs.c: print file descriptors using printfd
* btrfs.c (btrfs_ioctl): Print struct btrfs_ioctl_send_args.send_fd,
struct btrfs_ioctl_vol_args.fd, and struct btrfs_ioctl_vol_args_v2.fd
using printfd.
* tests/btrfs.c (btrfs_print_vol_args_v2, btrfs_test_subvol_ioctls,
btrfs_test_device_ioctls, btrfs_test_clone_ioctls,
btrfs_test_send_ioctl): Update.
Dmitry V. Levin [Tue, 24 May 2016 01:33:08 +0000 (01:33 +0000)]
tests/btrfs.c: do not print errno in case of fs type mismatch
* tests/btrfs.c (main): Use error_msg_and_fail instead of
perror_msg_and_fail when the fs type of the given directory
is not BTRFS_SUPER_MAGIC.
Dmitry V. Levin [Tue, 24 May 2016 01:32:55 +0000 (01:32 +0000)]
tests/btrfs.c: fix indentation
* tests/btrfs.c: Fix indentation of preprocessor directives
and function prototypes.